Index: trunk/phase3/includes/Hooks.php |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | * problem here. |
149 | 149 | */ |
150 | 150 | $retval = null; |
151 | | - $handler = set_error_handler( 'hookErrorHandler' ); |
| 151 | + set_error_handler( 'hookErrorHandler' ); |
152 | 152 | wfProfileIn( $func ); |
153 | 153 | try { |
154 | 154 | $retval = call_user_func_array( $callback, $hook_args ); |
— | — | @@ -155,11 +155,9 @@ |
156 | 156 | $badhookmsg = $e->getMessage(); |
157 | 157 | } |
158 | 158 | wfProfileOut( $func ); |
159 | | - // Need to check for null, because set_error_handler borks on it... sigh |
160 | | - if ( $handler !== null ) set_error_handler( $handler ); |
| 159 | + restore_error_handler(); |
161 | 160 | |
162 | 161 | /* String return is an error; false return means stop processing. */ |
163 | | - |
164 | 162 | if ( is_string( $retval ) ) { |
165 | 163 | global $wgOut; |
166 | 164 | $wgOut->showFatalError( $retval ); |