Index: trunk/extensions/ErrorHandler/ErrorHandler.php |
— | — | @@ -40,6 +40,11 @@ |
41 | 41 | $wgErrorHandlerAlwaysReport = false; |
42 | 42 | |
43 | 43 | /** |
| 44 | + * Whether to report even after output |
| 45 | + */ |
| 46 | +$wgErrorHandlerReportAfterOutput = true; |
| 47 | + |
| 48 | +/** |
44 | 49 | * Log errors? |
45 | 50 | * if true, this will in php error log and if it's a string and the file exists |
46 | 51 | * it'll be in that file |
— | — | @@ -79,9 +84,9 @@ |
80 | 85 | global $wgErrorHandlerErrors, $wgErrorHandlerOutputDone, |
81 | 86 | $wgErrorHandlerShowBackTrace, $wgErrorHandlerReport, |
82 | 87 | $wgErrorHandlerMaxStringSize, $wgErrorHandlerAlwaysReport, |
83 | | - $wgErrorHandlerLog; |
| 88 | + $wgErrorHandlerReportAfterOutput, $wgErrorHandlerLog; |
84 | 89 | global $IP, $wgCommandLineMode; |
85 | | - static $errorsMap = array ( |
| 90 | + static $errorsMap = array( |
86 | 91 | E_ERROR => 'fatal', |
87 | 92 | E_WARNING => 'warning', |
88 | 93 | E_PARSE => 'parse', |
— | — | @@ -187,7 +192,8 @@ |
188 | 193 | echo $errText; |
189 | 194 | } else { |
190 | 195 | if( $wgErrorHandlerOutputDone ) |
191 | | - echo efErrorGetText( $err ); |
| 196 | + if( $wgErrorHandlerReportAfterOutput ) |
| 197 | + echo efErrorGetText( $err ); |
192 | 198 | else |
193 | 199 | $wgErrorHandlerErrors[] = $err; |
194 | 200 | } |