X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FGlobalFunctions.php;h=421cd90ac012f69961de92730c87e7c988f5bd11;hb=0183ae1453588efe8c8f8318224fcdfa1d1e225c;hp=3bc3a9071257a46f2e46ecaabcaa88262dd0eb43;hpb=0c8e0c66feb9b8df65bd12cb4136a1410cef8758;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 3bc3a90712..421cd90ac0 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -308,10 +308,15 @@ function wfMergeErrorArrays( /*...*/ ) { $out = array(); foreach ( $args as $errors ) { foreach ( $errors as $params ) { + $originalParams = $params; + if ( $params[0] instanceof MessageSpecifier ) { + $msg = $params[0]; + $params = array_merge( array( $msg->getKey() ), $msg->getParams() ); + } # @todo FIXME: Sometimes get nested arrays for $params, # which leads to E_NOTICEs $spec = implode( "\t", $params ); - $out[$spec] = $params; + $out[$spec] = $originalParams; } } return array_values( $out );