X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FForkController.php;h=ced45af669c57fde741b75cbf2b01c08ad6822c4;hb=ae6e6edcca46dff2f367a782500f761c3ef0ac1d;hp=448bc03be717d6d6e12fb788955b8a37ceefaee3;hpb=280cb1c5f8ded97bd9b648d776b26c6ef03b29d3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ForkController.php b/includes/ForkController.php index 448bc03be7..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 ) { @@ -140,7 +142,7 @@ class ForkController { // Don't share DB, storage, or memcached connections wfGetLBFactory()->destroyInstance(); FileBackendGroup::destroySingleton(); - LockManagerGroup::destroySingleton(); + LockManagerGroup::destroySingletons(); ObjectCache::clear(); $wgMemc = null; }