mirror of
https://github.com/mrclay/minify.git
synced 2025-08-29 16:49:47 +02:00
fix passing invalid parametrs to flock. #51
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user