summaryrefslogtreecommitdiff
path: root/includes/Hooks.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Hooks.php')
-rw-r--r--includes/Hooks.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 20103db4..046a149d 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -19,6 +19,7 @@
*
* @author Evan Prodromou <evan@wikitravel.org>
* @see hooks.txt
+ * @file
*/
@@ -27,7 +28,7 @@
* careful about its contents. So, there's a lot more error-checking
* in here than would normally be necessary.
*/
-function wfRunHooks($event, $args = null) {
+function wfRunHooks($event, $args = array()) {
global $wgHooks;
@@ -108,6 +109,9 @@ function wfRunHooks($event, $args = null) {
$callback = $func;
}
+ // Run autoloader (workaround for call_user_func_array bug)
+ is_callable( $callback );
+
/* Call the hook. */
wfProfileIn( $func );
$retval = call_user_func_array( $callback, $hook_args );
@@ -140,4 +144,3 @@ function wfRunHooks($event, $args = null) {
return true;
}
-