r55855 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55854‎ | r55855 | r55856 >
Date:20:02, 5 September 2009
Author:ialex
Status:ok
Tags:
Comment:
Fixed E_NOTICE when passing an option that isn't listed in available options
Modified paths:
  • /trunk/phase3/maintenance/Maintenance.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/Maintenance.php
@@ -444,7 +444,7 @@
445445 # Short options
446446 for ( $p=1; $p<strlen( $arg ); $p++ ) {
447447 $option = $arg{$p};
448 - if ( $this->mParams[$option]['withArg'] ) {
 448+ if ( isset( $this->mParams[$option]['withArg'] ) && $this->mParams[$option]['withArg'] ) {
449449 $param = next( $argv );
450450 if ( $param === false ) {
451451 $this->error( "\nERROR: $option needs a value after it\n" );

Status & tagging log