Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove deprecation warning
`unserialize(null)` causes a deprecation warning flooding the logs, so in case
the cache for a given cache is empty this warning will be seen. To avoid this
use `''` as a replacement.

`unserialize(null) === unserialzie('') === false` this does not change behaviour.
  • Loading branch information
sideshowcoder committed Mar 15, 2023
commit 8999079c23c91b50e8022b940281505f85cd8303
2 changes: 1 addition & 1 deletion src/Adapter/Predis/PredisCachePool.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(Client $cache)
*/
protected function fetchObjectFromCache($key)
{
if (false === $result = unserialize($this->cache->get($this->getHierarchyKey($key)))) {
if (false === $result = unserialize($this->cache->get($this->getHierarchyKey($key)) ?? '')) {
return [false, null, [], null];
}

Expand Down