1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-19 04:11:20 +02:00

Prevent 0-byte files caused by file_put_contents + LOCK_EX.

This commit is contained in:
Steve Clay
2008-07-24 00:38:55 +00:00
parent 974f84305e
commit 6b4bfe84c4

View File

@@ -91,7 +91,7 @@ class Minify_Cache_File {
*/
private static function _verifiedWrite($file, $data)
{
if (! @file_put_contents($file, $data, LOCK_EX)) {
if (! @file_put_contents($file, $data)) {
return false;
}
if (md5($data) !== md5_file($file)) {