Skip to content
Open
Changes from all commits
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
8 changes: 5 additions & 3 deletions system/libraries/Cache/drivers/Cache_redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ public function __construct()
* Get cache
*
* @param string $key Cache ID
* @return mixed
* @return mixed Cached value, NULL for a missing key, unsupported type or failed conversion;
* FALSE if unserialization fails or the legacy Redis GET fallback returns FALSE
* @throws ValueError If settype() is given an invalid type (PHP 8+)
*/
public function get($key)
{
Expand All @@ -180,10 +182,10 @@ public function get($key)
case 'NULL':
return settype($data['__ci_value'], $data['__ci_type'])
? $data['__ci_value']
: FALSE;
: NULL;
case 'resource':
default:
return FALSE;
return NULL;
}
}

Expand Down