From 3481441d1ae242de2fc90c653302cd5e06e2b07a Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 12 Jan 2006 08:40:13 +0000 Subject: [PATCH] * Avoid PHP notice on command-line scripts if empty argument is passed ('') --- RELEASE-NOTES | 4 ++++ maintenance/commandLine.inc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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