mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-74438 cache: Check if cached value is boolean false
This commit is contained in:
parent
b5f51883f0
commit
8937de6f40
2
cache/stores/file/lib.php
vendored
2
cache/stores/file/lib.php
vendored
@ -518,7 +518,7 @@ class cachestore_file extends cache_store implements cache_is_key_aware, cache_i
|
||||
*/
|
||||
protected function prep_data_after_read($data) {
|
||||
$result = @unserialize($data);
|
||||
if ($result === false) {
|
||||
if ($result === false && $data != serialize(false)) {
|
||||
throw new coding_exception('Failed to unserialise data from file. Either failed to read, or failed to write.');
|
||||
}
|
||||
return $result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user