Followup r78924: keep track of exception/warning comments separately, to prevent...
[lhc/web/wiklou.git] / includes / MWFunction.php
index 0756ad2..8a944df 100644 (file)
@@ -30,6 +30,12 @@ class MWFunction {
                        }
                }
                
+               if( count( $callback ) == 2 && $callback[0] == 'self' || $callback[0] == 'parent' ) {
+                       
+                       throw new MWException( 'MWFunction cannot call self::method() or parent::method()' );
+                       
+               }
+               
                // Run autoloader (workaround for call_user_func_array bug: http://bugs.php.net/bug.php?id=51329)
                is_callable( $callback );