X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FQueue%2FRunner.php;h=e2a585a3c328c64a473c3ddfa1ceddf490444a73;hb=41e929f8cd794c24d89b26f4946477dad1a99aa5;hp=be45d00fe3024791ff0c973dbfaacf1715c97c29;hpb=2e1f50d6c1bd31b78fa97d1e899d4ae01a2cfd3d;p=civicrm-core.git diff --git a/CRM/Queue/Runner.php b/CRM/Queue/Runner.php index be45d00fe3..e2a585a3c3 100644 --- a/CRM/Queue/Runner.php +++ b/CRM/Queue/Runner.php @@ -97,8 +97,8 @@ class CRM_Queue_Runner { $this->queue = $runnerSpec['queue']; $this->errorMode = CRM_Utils_Array::value('errorMode', $runnerSpec, self::ERROR_ABORT); $this->isMinimal = CRM_Utils_Array::value('isMinimal', $runnerSpec, FALSE); - $this->onEnd = CRM_Utils_Array::value('onEnd', $runnerSpec, NULL); - $this->onEndUrl = CRM_Utils_Array::value('onEndUrl', $runnerSpec, NULL); + $this->onEnd = $runnerSpec['onEnd'] ?? NULL; + $this->onEndUrl = $runnerSpec['onEndUrl'] ?? NULL; $this->pathPrefix = CRM_Utils_Array::value('pathPrefix', $runnerSpec, 'civicrm/queue'); $this->buttons = CRM_Utils_Array::value('buttons', $runnerSpec, ['retry' => TRUE, 'skip' => TRUE]); // perhaps this value should be randomized? @@ -152,7 +152,6 @@ class CRM_Queue_Runner { // setting -- it should be more of a contextual/stack-based setting. // This should be appropriate because queue-runners are not used with // basic web pages -- they're used with CLI/REST/AJAX. - $errorScope = CRM_Core_TemporaryErrorScope::useException(); $taskResult = $this->runNext(); $errorScope = NULL; } @@ -303,7 +302,7 @@ class CRM_Queue_Runner { * * @param bool $isOK * TRUE if the task completed successfully. - * @param Exception|NULL $exception + * @param Exception|null $exception * If applicable, an unhandled exception that arose during execution. * * @return array