http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70406
Revision: 70406 Author: nikerabbit Date: 2010-08-03 19:46:18 +0000 (Tue, 03 Aug 2010) Log Message: ----------- Follow-up r70109: use restore_error_handler() Modified Paths: -------------- trunk/phase3/includes/Hooks.php Modified: trunk/phase3/includes/Hooks.php =================================================================== --- trunk/phase3/includes/Hooks.php 2010-08-03 19:45:08 UTC (rev 70405) +++ trunk/phase3/includes/Hooks.php 2010-08-03 19:46:18 UTC (rev 70406) @@ -147,7 +147,7 @@ * problem here. */ $retval = null; - $handler = set_error_handler( 'hookErrorHandler' ); + set_error_handler( 'hookErrorHandler' ); wfProfileIn( $func ); try { $retval = call_user_func_array( $callback, $hook_args ); @@ -155,11 +155,9 @@ $badhookmsg = $e->getMessage(); } wfProfileOut( $func ); - // Need to check for null, because set_error_handler borks on it... sigh - if ( $handler !== null ) set_error_handler( $handler ); + restore_error_handler(); /* String return is an error; false return means stop processing. */ - if ( is_string( $retval ) ) { global $wgOut; $wgOut->showFatalError( $retval ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs