mirror of
https://github.com/mrclay/minify.git
synced 2025-08-20 21:02:30 +02:00
Prevent 0-byte files caused by file_put_contents + LOCK_EX.
This commit is contained in:
@@ -91,7 +91,7 @@ class Minify_Cache_File {
|
|||||||
*/
|
*/
|
||||||
private static function _verifiedWrite($file, $data)
|
private static function _verifiedWrite($file, $data)
|
||||||
{
|
{
|
||||||
if (! @file_put_contents($file, $data, LOCK_EX)) {
|
if (! @file_put_contents($file, $data)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (md5($data) !== md5_file($file)) {
|
if (md5($data) !== md5_file($file)) {
|
||||||
|
Reference in New Issue
Block a user