From: Brion Vibber Date: Thu, 12 Jan 2006 08:40:13 +0000 (+0000) Subject: * Avoid PHP notice on command-line scripts if empty argument is passed ('') X-Git-Tag: 1.6.0~596 X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=commitdiff_plain;h=3481441d1ae242de2fc90c653302cd5e06e2b07a;p=lhc%2Fweb%2Fwiklou.git * Avoid PHP notice on command-line scripts if empty argument is passed ('') --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 17d9f85786..6440a95870 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -462,6 +462,10 @@ fully support the editing toolbar, but was found to be too confusing. * Improve "upload disabled" notice * Move parts of index.php to include/Wiki.php in an attempt to both cleanup index.php and create a MediaWiki-class mediaWiki base object +* (bug 4104) Added OutputPageBeforeHTML hook for tweaking primary wiki output + HTML on final output (cached or not) +* Avoid PHP notice on command-line scripts if empty argument is passed ('') + === Caveats === diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 62c7ae6c26..1c9d1afe9c 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -55,7 +55,7 @@ for( $arg = reset( $argv ); $arg !== false; $arg = next( $argv ) ) { } $options[$option] = $param; } - } elseif ( $arg{0} == '-' ) { + } elseif ( substr( $arg, 0, 1 ) == '-' ) { # Short options for ( $p=1; $p