Index: trunk/phase3/tests/phpunit/includes/GlobalTest.php |
— | — | @@ -421,8 +421,8 @@ |
422 | 422 | array_unshift( $param_set, $sampleUTF ); |
423 | 423 | |
424 | 424 | $this->assertEquals( |
425 | | - call_user_func_array( 'mb_substr', $param_set ), |
426 | | - call_user_func_array( array( 'Fallback', 'mb_substr' ), $param_set ), |
| 425 | + MWFunction::callArray( 'mb_substr', $param_set ), |
| 426 | + MWFunction::callArray( 'Fallback::mb_substr', $param_set ), |
427 | 427 | 'Fallback mb_substr with params ' . implode( ', ', $old_param_set ) |
428 | 428 | ); |
429 | 429 | } |
— | — | @@ -451,14 +451,14 @@ |
452 | 452 | array_unshift( $param_set, $sampleUTF ); |
453 | 453 | |
454 | 454 | $this->assertEquals( |
455 | | - call_user_func_array( 'mb_strpos', $param_set ), |
456 | | - call_user_func_array( array( 'Fallback', 'mb_strpos' ), $param_set ), |
| 455 | + MWFunction::callArray( 'mb_strpos', $param_set ), |
| 456 | + MWFunction::callArray( 'Fallback::mb_strpos', $param_set ), |
457 | 457 | 'Fallback mb_strpos with params ' . implode( ', ', $old_param_set ) |
458 | 458 | ); |
459 | 459 | |
460 | 460 | $this->assertEquals( |
461 | | - call_user_func_array( 'mb_strrpos', $param_set ), |
462 | | - call_user_func_array( array( 'Fallback', 'mb_strrpos' ), $param_set ), |
| 461 | + MWFunction::callArray( 'mb_strrpos', $param_set ), |
| 462 | + MWFunction::callArray( 'Fallback::mb_strrpos', $param_set ), |
463 | 463 | 'Fallback mb_strrpos with params ' . implode( ', ', $old_param_set ) |
464 | 464 | ); |
465 | 465 | } |
Index: trunk/phase3/includes/MWFunction.php |
— | — | @@ -30,8 +30,6 @@ |
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | | - $callback = (array) $callback; |
35 | | - |
36 | 34 | if( count( $callback ) == 2 && $callback[0] == 'self' || $callback[0] == 'parent' ) { |
37 | 35 | |
38 | 36 | throw new MWException( 'MWFunction cannot call self::method() or parent::method()' ); |