Skip to content

Commit 3e1f067

Browse files
Fix adding null cachetags
Fixes Warning: assert(): Cache tags must be valid strings
1 parent 8a73a48 commit 3e1f067

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ViewBuilder/ViewBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ public function addCacheTag($tag)
164164
if ($tag instanceof EntityInterface) {
165165
return $this->addCacheTags($tag->getCacheTagsToInvalidate());
166166
}
167-
$this->cache['tags'][] = $tag;
167+
if ($tag) {
168+
$this->cache['tags'][] = $tag;
169+
}
168170

169171
return $this;
170172
}

0 commit comments

Comments
 (0)