X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fpoolcounter%2FPoolCounterWorkViaCallback.php;h=aed52d195752f52f4cce01e11f30d9854923ff33;hb=0848e9049c66f6400624a40427b6abc6476f28a5;hp=85a7cef6ef532bcdd28734691f0d82cded040faa;hpb=601519ee36462faabacf4547c9aefaf7e8726476;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/poolcounter/PoolCounterWorkViaCallback.php b/includes/poolcounter/PoolCounterWorkViaCallback.php index 85a7cef6ef..aed52d1957 100644 --- a/includes/poolcounter/PoolCounterWorkViaCallback.php +++ b/includes/poolcounter/PoolCounterWorkViaCallback.php @@ -44,7 +44,7 @@ class PoolCounterWorkViaCallback extends PoolCounterWork { * If a 'doCachedWork' callback is provided, then execute() may wait for any prior * process in the pool to finish and reuse its cached result. * - * @param string $type + * @param string $type The class of actions to limit concurrency for * @param string $key * @param array $callbacks Map of callbacks * @throws MWException @@ -66,26 +66,26 @@ class PoolCounterWorkViaCallback extends PoolCounterWork { } public function doWork() { - return call_user_func_array( $this->doWork, [] ); + return ( $this->doWork )(); } public function getCachedWork() { if ( $this->doCachedWork ) { - return call_user_func_array( $this->doCachedWork, [] ); + return ( $this->doCachedWork )(); } return false; } public function fallback() { if ( $this->fallback ) { - return call_user_func_array( $this->fallback, [] ); + return ( $this->fallback )(); } return false; } public function error( $status ) { if ( $this->error ) { - return call_user_func_array( $this->error, [ $status ] ); + return ( $this->error )( $status ); } return false; }