diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php index 5379946b0c8..e6943d08175 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php @@ -43,7 +43,7 @@ class LibraryDiscoveryCollector extends CacheCollector { */ public function __construct(CacheBackendInterface $cache, LockBackendInterface $lock, LibraryDiscoveryParser $discovery_parser, ThemeManagerInterface $theme_manager) { $this->themeManager = $theme_manager; - parent::__construct(NULL, $cache, $lock, ['library_info']); + parent::__construct('', $cache, $lock, ['library_info']); $this->discoveryParser = $discovery_parser; } @@ -52,7 +52,7 @@ class LibraryDiscoveryCollector extends CacheCollector { * {@inheritdoc} */ protected function getCid() { - if (!isset($this->cid)) { + if ($this->cid === '') { $this->cid = 'library_info:' . $this->themeManager->getActiveTheme()->getName(); } @@ -164,7 +164,7 @@ class LibraryDiscoveryCollector extends CacheCollector { */ public function reset() { parent::reset(); - $this->cid = NULL; + $this->cid = ''; } } diff --git a/core/lib/Drupal/Core/Menu/MenuActiveTrail.php b/core/lib/Drupal/Core/Menu/MenuActiveTrail.php index 978aeffbf4f..d11be878e6b 100644 --- a/core/lib/Drupal/Core/Menu/MenuActiveTrail.php +++ b/core/lib/Drupal/Core/Menu/MenuActiveTrail.php @@ -42,7 +42,7 @@ class MenuActiveTrail extends CacheCollector implements MenuActiveTrailInterface * The lock backend. */ public function __construct(MenuLinkManagerInterface $menu_link_manager, RouteMatchInterface $route_match, CacheBackendInterface $cache, LockBackendInterface $lock) { - parent::__construct(NULL, $cache, $lock); + parent::__construct('', $cache, $lock); $this->menuLinkManager = $menu_link_manager; $this->routeMatch = $route_match; } @@ -53,7 +53,7 @@ class MenuActiveTrail extends CacheCollector implements MenuActiveTrailInterface * @see ::getActiveTrailIds() */ protected function getCid() { - if (!isset($this->cid)) { + if ($this->cid === '') { $route_parameters = $this->routeMatch->getRawParameters()->all(); ksort($route_parameters); $this->cid = 'active-trail:route:' . $this->routeMatch->getRouteName() . ':route_parameters:' . serialize($route_parameters);