1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-14 01:54:11 +02:00

Merge pull request #94 from glensc/issue-51

Handle faiure to open cache file for writing
This commit is contained in:
Steve Clay
2014-03-19 10:34:30 -04:00

View File

@@ -98,6 +98,9 @@ class Minify_Cache_File {
{ {
if ($this->_locking) { if ($this->_locking) {
$fp = fopen($this->_path . '/' . $id, 'rb'); $fp = fopen($this->_path . '/' . $id, 'rb');
if (!$fp) {
return false;
}
flock($fp, LOCK_SH); flock($fp, LOCK_SH);
$ret = stream_get_contents($fp); $ret = stream_get_contents($fp);
flock($fp, LOCK_UN); flock($fp, LOCK_UN);