🇮🇳India @Ajaysinh

Account created on 18 August 2023, over 1 year ago
#

Recent comments

🇮🇳India Ajaysinh

diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/modules/views/src/Plugin/views/query/Sql.php
index 47f229f9..1e8e4da6 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -1707,7 +1707,9 @@ class Sql extends QueryPluginBase {
   public function getCacheMaxAge() {
     $max_age = parent::getCacheMaxAge();
     foreach ($this->getAllEntities() as $entity) {
-      $max_age = Cache::mergeMaxAges($max_age, $entity->getCacheMaxAge());
+           if(!is_null($entity)){
+                   $max_age = Cache::mergeMaxAges($max_age, $entity->getCacheMaxAge());
+           }
     }

     return $max_age;
 

Production build 0.71.5 2024