aboutsummaryrefslogtreecommitdiffstats
path: root/includes/libs
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2022-07-28 03:12:16 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2022-07-28 03:12:16 +0000
commit42745591b777e8b2e666ab69e7a8817b3a7db59a (patch)
tree154340b79bc455e713ed527a01d2be758efdc4e9 /includes/libs
parent4765b3ad54fb3c9f43051ccdbe5d70af3bd8e268 (diff)
parent19dd1a71542ac5a2528cfe856fda23158d05c5fc (diff)
downloadmediawikicore-42745591b777e8b2e666ab69e7a8817b3a7db59a.tar.gz
mediawikicore-42745591b777e8b2e666ab69e7a8817b3a7db59a.zip
Merge "tests: Minor follow-up to MySQLPlatformTest/FileBackendTest php8.1 fixes"
Diffstat (limited to 'includes/libs')
-rw-r--r--includes/libs/filebackend/FileBackend.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/libs/filebackend/FileBackend.php b/includes/libs/filebackend/FileBackend.php
index 6ab20034d39d..db6cb3970fe8 100644
--- a/includes/libs/filebackend/FileBackend.php
+++ b/includes/libs/filebackend/FileBackend.php
@@ -198,7 +198,7 @@ abstract class FileBackend implements LoggerAwareInterface {
$this->domainId = $config['domainId'] // e.g. "my_wiki-en_"
?? $config['wikiId'] // b/c alias
?? null;
- if ( !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this->name ) ) {
+ if ( !is_string( $this->name ) || !preg_match( '!^[a-zA-Z0-9-_]{1,255}$!', $this->name ) ) {
throw new InvalidArgumentException( "Backend name '{$this->name}' is invalid." );
}
if ( !is_string( $this->domainId ) ) {