Commit 8658b74e authored by gbyte.co's avatar gbyte.co Committed by gbyte.co

Issue #3012415 by CMS_MacGyver, gbyte.co: Generate from Queue throws error on Core 8.6.3

parent 935fdb62
...@@ -324,8 +324,7 @@ class QueueWorker { ...@@ -324,8 +324,7 @@ class QueueWorker {
} }
protected function unstashResults() { protected function unstashResults() {
if ($this->state->has('simple_sitemap.queue_stashed_results')) { if (NULL !== $results = $this->state->get('simple_sitemap.queue_stashed_results')) {
$results = $this->state->get('simple_sitemap.queue_stashed_results');
$this->state->delete('simple_sitemap.queue_stashed_results'); $this->state->delete('simple_sitemap.queue_stashed_results');
$this->results = !empty($results['results']) ? $results['results'] : []; $this->results = !empty($results['results']) ? $results['results'] : [];
$this->processedPaths = !empty($results['processed_paths']) ? $results['processed_paths'] : []; $this->processedPaths = !empty($results['processed_paths']) ? $results['processed_paths'] : [];
...@@ -351,9 +350,7 @@ class QueueWorker { ...@@ -351,9 +350,7 @@ class QueueWorker {
} }
public function getStashedResultCount() { public function getStashedResultCount() {
return ($this->state->has('simple_sitemap.queue_stashed_results') return count($this->state->get('simple_sitemap.queue_stashed_results', ['results' => []])['results']);
? count($this->state->get('simple_sitemap.queue_stashed_results', ['results' => []])['results'])
: 0);
} }
public function getProcessedElementCount() { public function getProcessedElementCount() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment