fixed #50, file_put_contents함수에 LOCK_EX flag 적

This commit is contained in:
khongchi 2013-11-15 12:56:29 +09:00
parent ab021d75c7
commit 71c8a0b99f
11 changed files with 14 additions and 14 deletions

View file

@ -101,7 +101,7 @@ class HTMLPurifier_DefinitionCache_Serializer extends
* @return Number of bytes written if success, or false if failure.
*/
private function _write($file, $data, $config) {
$result = file_put_contents($file, $data);
$result = file_put_contents($file, $data, LOCK_EX);
if ($result !== false) {
// set permissions of the new file (no execute)
$chmod = $config->get('Cache.SerializerPermissions');