Index: trunk/phase3/includes/MWFunction.php |
— | — | @@ -30,6 +30,14 @@ |
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
| 34 | + $callback = (array) $callback; |
| 35 | + |
| 36 | + if( count( $callback ) == 2 && $callback[0] == 'self' || $callback[0] == 'parent' ) { |
| 37 | + |
| 38 | + throw new MWException( 'MWFunction cannot call self::method() or parent::method()' ); |
| 39 | + |
| 40 | + } |
| 41 | + |
34 | 42 | // Run autoloader (workaround for call_user_func_array bug: http://bugs.php.net/bug.php?id=51329) |
35 | 43 | is_callable( $callback ); |
36 | 44 | |