Index: trunk/phase3/maintenance/Maintenance.php |
— | — | @@ -314,9 +314,9 @@ |
315 | 315 | * Throw an error to the user. Doesn't respect --quiet, so don't use |
316 | 316 | * this for non-error output |
317 | 317 | * @param $err String: the error to display |
318 | | - * @param $die Boolean: If true, go ahead and die out. |
| 318 | + * @param $die Int: if > 0, go ahead and die out using this int as the code |
319 | 319 | */ |
320 | | - protected function error( $err, $die = false ) { |
| 320 | + protected function error( $err, $die = 0 ) { |
321 | 321 | $this->outputChanneled( false ); |
322 | 322 | if ( php_sapi_name() == 'cli' ) { |
323 | 323 | fwrite( STDERR, $err . "\n" ); |
— | — | @@ -325,8 +325,9 @@ |
326 | 326 | fwrite( $f, $err . "\n" ); |
327 | 327 | fclose( $f ); |
328 | 328 | } |
329 | | - if ( $die ) { |
330 | | - die(); |
| 329 | + $die = intval( $die ); |
| 330 | + if ( $die > 0 ) { |
| 331 | + die( $die ); |
331 | 332 | } |
332 | 333 | } |
333 | 334 | |