From 4efcaf0952ca0b3313a9cc3bd883d4321849bbd5 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 24 Nov 2004 11:43:42 +0000 Subject: [PATCH] Remove some redundant checks; if these ever failed, PHP would have first thrown an error about not having required parameters to the function. --- includes/GlobalFunctions.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) 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 ); } -- 2.20.1