dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
969561a
)
Throw an exception if calling parent or self on MWFunction.
author
X!
<soxred93@users.mediawiki.org>
Mon, 3 Jan 2011 20:19:51 +0000
(20:19 +0000)
committer
X!
<soxred93@users.mediawiki.org>
Mon, 3 Jan 2011 20:19:51 +0000
(20:19 +0000)
includes/MWFunction.php
patch
|
blob
|
history
diff --git
a/includes/MWFunction.php
b/includes/MWFunction.php
index
0756ad2
..
8c646f6
100644
(file)
--- a/
includes/MWFunction.php
+++ b/
includes/MWFunction.php
@@
-30,6
+30,14
@@
class MWFunction {
}
}
+ $callback = (array) $callback;
+
+ 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 );