Remove some redundant checks; if these ever failed, PHP would have first thrown an...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 24 Nov 2004 11:43:42 +0000 (11:43 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 24 Nov 2004 11:43:42 +0000 (11:43 +0000)
includes/GlobalFunctions.php

index 3fc9231..d4e2c9b 100644 (file)
@@ -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 );
 }