Author: emil
Description:
http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=30144 should be applied to Parser_OldPP.php too. Below is the patch:
Index: includes/parser/Parser_OldPP.php
- includes/parser/Parser_OldPP.php (revision 40727)
+++ includes/parser/Parser_OldPP.php (working copy)
@@ -578,6 +578,10 @@
break; default: if( isset( $this->mTagHooks[$tagName] ) ) {
+ # Workaround for PHP bug 35229 and similar
+ if ( !is_callable( $this->mTagHooks[$name] ) ) {
+ throw new MWException( "Tag hook for $name is not callable\n" );
+ }
$output = call_user_func_array( $this->mTagHooks[$tagName], array( $content, $params, $this ) ); } else {
@@ -2999,6 +3003,11 @@
if ( $function ) { $funcArgs = array_map( 'trim', $args ); $funcArgs = array_merge( array( &$this, trim( substr( $part1, $colonPos + 1 ) ) ), $funcArgs );
+
+ # Workaround for PHP bug 35229 and similar
+ if ( !is_callable( $this->mFunctionHooks[$function] ) ) {
+ throw new MWException( "Function hook for $function is not callable\n" );
+ }
$result = call_user_func_array( $this->mFunctionHooks[$function], $funcArgs ); $found = true;
Emil
Version: 1.13.x
Severity: major