X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FForkController.php;h=ced45af669c57fde741b75cbf2b01c08ad6822c4;hb=008c561245742cdff111d4821839c9242f75ecb0;hp=2a05411ef2452b0d705143bb40a95a1cd06c5ffb;hpb=11e9ae0b193e891b409c5c1dc115a52452a8336b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ForkController.php b/includes/ForkController.php index 2a05411ef2..ced45af669 100644 --- a/includes/ForkController.php +++ b/includes/ForkController.php @@ -53,7 +53,7 @@ class ForkController { const RESTART_ON_ERROR = 1; public function __construct( $numProcs, $flags = 0 ) { - if ( php_sapi_name() != 'cli' ) { + if ( PHP_SAPI != 'cli' ) { throw new MWException( "ForkController cannot be used from the web." ); } $this->procsToStart = $numProcs; @@ -121,7 +121,9 @@ class ForkController { if ( function_exists( 'pcntl_signal_dispatch' ) ) { pcntl_signal_dispatch(); } else { - declare (ticks=1) { $status = $status; } + declare( ticks = 1 ) { + $status = $status; + } } // Respond to TERM signal if ( $this->termReceived ) {