diff --git a/classes/Autoload.php b/classes/Autoload.php index ca1b07eab..8faf7fc26 100644 --- a/classes/Autoload.php +++ b/classes/Autoload.php @@ -142,7 +142,7 @@ class Autoload do { $integrity_is_ok = false; - file_put_contents($filename, $content); + file_put_contents($filename, $content, LOCK_EX); if ($loop_protection++ > 10) break; @@ -154,7 +154,7 @@ class Autoload if (!$integrity_is_ok) { - file_put_contents($filename, ''); + file_put_contents($filename, '', LOCK_EX); // Cannot use PrestaShopException in this context die('Your file '.$filename.' is corrupted. Please remove this file, a new one will be regenerated automatically'); }