break;
default:
if( isset( $this->mTagHooks[$tagName] ) ) {
+ # Workaround for PHP bug 35229 and similar
+ if ( !is_callable( $this->mTagHooks[$tagName] ) ) {
+ throw new MWException( "Tag hook for $tagName is not callable\n" );
+ }
$output = call_user_func_array( $this->mTagHooks[$tagName],
array( $content, $params, $this ) );
} else {
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;