For MediaWiki (recent comments | status changes | tags | authors | states | release notes)
Index: trunk/phase3/includes/Parser.php =================================================================== --- trunk/phase3/includes/Parser.php (revision 30143) +++ trunk/phase3/includes/Parser.php (revision 30144) @@ -2835,6 +2835,10 @@ $allArgs = array_merge( $initialArgs, $funcArgs ); } + # Workaround for PHP bug 35229 and similar + if ( !is_callable( $callback ) ) { + throw new MWException( "Tag hook for $name is not callable\n" ); + } $result = call_user_func_array( $callback, $allArgs ); $found = true; @@ -3239,6 +3243,10 @@ break; default: if( isset( $this->mTagHooks[$name] ) ) { + # 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[$name], array( $content, $attributes, $this ) ); } else {