From: Steve Sanbeg Date: Tue, 20 Nov 2007 20:55:11 +0000 (+0000) Subject: try to prevent old extensions from exploding mysteriously; probably, there's a better... X-Git-Tag: 1.31.0-rc.0~50770 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=b372d09e8512b24fbf83c3d5142d4a089b11c37c;p=lhc%2Fweb%2Fwiklou.git try to prevent old extensions from exploding mysteriously; probably, there's a better way to do this --- diff --git a/includes/Parser.php b/includes/Parser.php index 87e1a7db11..0751d9bffa 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3181,6 +3181,13 @@ class Parser $allArgs = array_merge( $initialArgs, $funcArgs ); } + if (! is_callable($callback)) { + if (is_array($callback)) + $callback = $callback[0]; + else + die ("\nInvalid callback for $function: '$callback' ($flags)\n"); + } + $result = call_user_func_array( $callback, $allArgs ); $found = true;