From b372d09e8512b24fbf83c3d5142d4a089b11c37c Mon Sep 17 00:00:00 2001 From: Steve Sanbeg Date: Tue, 20 Nov 2007 20:55:11 +0000 Subject: [PATCH] try to prevent old extensions from exploding mysteriously; probably, there's a better way to do this --- includes/Parser.php | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.20.1