diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2022-01-23 11:09:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2022-01-23 11:09:21 +0000 |
commit | 3dbae93a02bcaede5d587ebd2fc6d4845189d64e (patch) | |
tree | 55c0661e9269ab13ccecc58aca5e7335d057fe4d | |
parent | 19690f3940138e4937618b88992cad25dcba7f0e (diff) | |
parent | 852b2ae1bc09ac2da760be06bb819d42cac2d87d (diff) |
Merge "update.php: Avoid passing null to substr"
-rwxr-xr-x | maintenance/update.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/maintenance/update.php b/maintenance/update.php index 38698b981022..5580ecc75a0f 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -93,7 +93,7 @@ class UpdateMediaWiki extends Maintenance { } $this->fileHandle = null; - if ( substr( $this->getOption( 'schema' ), 0, 2 ) === "--" ) { + if ( substr( $this->getOption( 'schema', '' ), 0, 2 ) === "--" ) { $this->fatalError( "The --schema option requires a file as an argument.\n" ); } elseif ( $this->hasOption( 'schema' ) ) { $file = $this->getOption( 'schema' ); |