According to online PHP docs, func_get_args() doesn't work in function parameter lists until PHP 5.3.0.
It does, however, work as the *first* parameter, which happens here and there in older code (eg array_slice(func_get_args(),1)).
Assigning to a variable and passing through works fine for this case on PHP 5.2.17.
* @see wfMessage
*/
public function msg( /* $args */ ) {
- return call_user_func_array( array( $this->getContext(), 'msg' ), func_get_args() );
+ // Note: can't use func_get_args() directly as second or later item in
+ // a parameter list until PHP 5.3 or you get a fatal error.
+ // Works fine as the first parameter, which appears elsewhere in the
+ // code base. Sighhhh.
+ $args = func_get_args();
+ return call_user_func_array( array( $this->getContext(), 'msg' ), $args );
}
/**