Skip to content

Commit cdb3616

Browse files
Merge pull request #2 from dimitriBouteille/fix/invalid-getHooks-return
🐞 Fix HookLoader::getHooks() return
2 parents f967a9e + 22ffe6b commit cdb3616

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/HookLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ protected function getHooks(): array
4141
$cacheRoutes = $this->cache->getItem(self::CACHE_KEY);
4242
if ($cacheRoutes->isHit()) {
4343
try {
44-
return unserialize($cacheRoutes->get());
44+
$result = unserialize($cacheRoutes->get());
45+
if (is_array($result)) {
46+
return $result;
47+
}
4548
} catch (\Exception) {
4649
}
4750
}

0 commit comments

Comments
 (0)