Bug in file handling
-
cache.php assumes fopen always succeeds, this is not the case.
A basic patch to add error handling:
--- cache.php.orig 2013-08-12 21:01:51.304559847 +0000 +++ cache.php 2013-08-12 21:01:30.613445609 +0000 @@ -249,6 +249,10 @@ function hyper_cache_write(&$data) { if ($data['gz']) unset($data['html']); } $file = fopen($hc_file, 'w'); + if (!$file) { + error_log("Failed to open cache file '$hc_file'"); + return; + } fwrite($file, serialize($data)); fclose($file);
- The topic ‘Bug in file handling’ is closed to new replies.