From: Alexandre Emsenhuber Date: Sat, 14 Mar 2009 20:09:48 +0000 (+0000) Subject: avoid E_NOTICE if only one argument is given to the "get" command X-Git-Tag: 1.31.0-rc.0~42485 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=53f770b89fcdf163e1ddcb184b5ed932c21eecdd;p=lhc%2Fweb%2Fwiklou.git avoid E_NOTICE if only one argument is given to the "get" command --- diff --git a/maintenance/mcc.php b/maintenance/mcc.php index 89605871bc..53645df825 100644 --- a/maintenance/mcc.php +++ b/maintenance/mcc.php @@ -88,7 +88,11 @@ do { break; case 'get': - print "Getting {$args[0]}[{$args[1]}]\n"; + $sub = ''; + if ( array_key_exists( 1, $args ) ) { + $sub = $args[1]; + } + print "Getting {$args[0]}[$sub]\n"; $res = $mcc->get( $args[0] ); if ( array_key_exists( 1, $args ) ) { $res = $res[$args[1]];