diff options
Diffstat (limited to 'lib/Minz/ModelArray.php')
| -rw-r--r-- | lib/Minz/ModelArray.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Minz/ModelArray.php b/lib/Minz/ModelArray.php index e3ec77dc9..ff23dbc83 100644 --- a/lib/Minz/ModelArray.php +++ b/lib/Minz/ModelArray.php @@ -45,9 +45,12 @@ class Minz_ModelArray { * Sauve le tableau $array dans le fichier $filename **/ protected function writeArray($array) { - if (!file_put_contents($this->filename, "<?php\n return " . var_export($array, true) . ';', LOCK_EX)) { + if (file_put_contents($this->filename, "<?php\n return " . var_export($array, true) . ';', LOCK_EX) === false) { throw new Minz_PermissionDeniedException($this->filename); } + if (function_exists('opcache_invalidate')) { + opcache_invalidate($this->filename); //Clear PHP 5.5+ cache for include + } return true; } |
