Skip to content

Commit 34a8b22

Browse files
committed
BUGFIX: Don't flush if tags is an empty array
FOS Varnish will call array_chunk on the given tags with the size of the tags array. If the tags are empty, an error is thrown.
1 parent bbd38eb commit 34a8b22

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Classes/Aspects/ContentCacheAspect.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ public function registerDisableContentCache(JoinPointInterface $joinPoint): void
129129
public function interceptContentCacheFlush(JoinPointInterface $joinPoint)
130130
{
131131
$object = $joinPoint->getProxy();
132-
133132
$tags = array_keys(ObjectAccess::getProperty($object, 'tagsToFlush', true));
133+
if ($tags === []) {
134+
return;
135+
}
134136

135137
$this->varnishBanService->banByTags($tags);
136138
}

0 commit comments

Comments
 (0)