From: Brion Vibber Date: Wed, 24 Nov 2004 11:43:42 +0000 (+0000) Subject: Remove some redundant checks; if these ever failed, PHP would have first thrown an... X-Git-Tag: 1.5.0alpha1~1255 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=4efcaf0952ca0b3313a9cc3bd883d4321849bbd5;p=lhc%2Fweb%2Fwiklou.git Remove some redundant checks; if these ever failed, PHP would have first thrown an error about not having required parameters to the function. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 3fc9231208..d4e2c9bf24 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -331,9 +331,7 @@ function wfReadOnly() { */ function wfMsg( $key ) { $args = func_get_args(); - if ( count( $args ) ) { - array_shift( $args ); - } + array_shift( $args ); return wfMsgReal( $key, $args, true ); } @@ -342,9 +340,7 @@ function wfMsg( $key ) { */ function wfMsgForContent( $key ) { $args = func_get_args(); - if ( count( $args ) ) { - array_shift( $args ); - } + array_shift( $args ); return wfMsgReal( $key, $args, true, true ); } @@ -353,9 +349,7 @@ function wfMsgForContent( $key ) { */ function wfMsgNoDB( $key ) { $args = func_get_args(); - if ( count( $args ) ) { - array_shift( $args ); - } + array_shift( $args ); return wfMsgReal( $key, $args, false ); } @@ -363,11 +357,8 @@ function wfMsgNoDB( $key ) { * Get a message from the language file, for the content */ function wfMsgNoDBForContent( $key ) { - $args = func_get_args(); - if ( count( $args ) ) { - array_shift( $args ); - } + array_shift( $args ); return wfMsgReal( $key, $args, false, true ); }