summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2022-01-23 11:09:21 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2022-01-23 11:09:21 +0000
commit3dbae93a02bcaede5d587ebd2fc6d4845189d64e (patch)
tree55c0661e9269ab13ccecc58aca5e7335d057fe4d
parent19690f3940138e4937618b88992cad25dcba7f0e (diff)
parent852b2ae1bc09ac2da760be06bb819d42cac2d87d (diff)
Merge "update.php: Avoid passing null to substr"
-rwxr-xr-xmaintenance/update.php2
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' );