Commit 67de3e4b authored by gbyte.co's avatar gbyte.co Committed by gbyte.co

Issue #3001319 by wells: count(): Parameter must be an array or an object that...

Issue #3001319 by wells: count(): Parameter must be an array or an object that implements Countable in PHP 7.2
parent 5c6898b7
......@@ -3,13 +3,11 @@
namespace Drupal\simple_sitemap\Plugin\simple_sitemap\SitemapGenerator;
use Drupal\simple_sitemap\Plugin\simple_sitemap\SimplesitemapPluginBase;
use Drupal\simple_sitemap\Simplesitemap;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Database\Connection;
use Drupal\Core\Extension\ModuleHandler;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Component\Datetime\Time;
use Drupal\Core\Cache\Cache;
/**
* Class SitemapGeneratorBase
......
......@@ -337,7 +337,7 @@ class QueueWorker {
public function getStashedResultCount() {
return ($this->state->has('simple_sitemap.queue_stashed_results')
? count($this->state->get('simple_sitemap.queue_stashed_results')['results'])
? count($this->state->get('simple_sitemap.queue_stashed_results', ['results' => []])['results'])
: 0);
}
......
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