From bbce0998bdd6982ebfc1b97e122c784001c72cb1 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 6 Aug 2009 00:32:50 +0000 Subject: [PATCH] Clean up missing param error, show help on die. -params are still kind of wonky. Could use a second set of eyes. --- maintenance/Maintenance.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 1e1ef994ff..22be3f3318 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -413,7 +413,8 @@ abstract class Maintenance { if ( isset( $this->mParams[$option] ) && $this->mParams[$option]['withArg'] ) { $param = next( $argv ); if ( $param === false ) { - $this->error( "$arg needs a value after it", true ); + $this->error( "\nERROR: $option needs a value after it\n" ); + $this->maybeHelp( true ); } $options[$option] = $param; } else { @@ -433,7 +434,8 @@ abstract class Maintenance { if ( $this->mParams[$option]['withArg'] ) { $param = next( $argv ); if ( $param === false ) { - $this->error( "$arg needs a value after it", true ); + $this->error( "\nERROR: $option needs a value after it\n" ); + $this->maybeHelp( true ); } $options[$option] = $param; } else { -- 2.20.1