From 105651a469eb103275a7860f02410528c471b2f1 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Mon, 31 Jul 2017 18:58:41 +0200 Subject: [PATCH] - Call clearstatcache() after mkdir() failure https://github.com/smarty-php/smarty/pull/379 --- change_log.txt | 3 +++ libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_runtime_writefile.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 77356cfcd..98166f25f 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== 3.1.32 - dev === +31.7.2017 + - Call clearstatcache() after mkdir() failure https://github.com/smarty-php/smarty/pull/379 + 30.7.2017 - rewrite mkdir() bugfix to retry automatically see https://github.com/smarty-php/smarty/pull/377 https://github.com/smarty-php/smarty/pull/379 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 5f5580a36..7b9586841 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -108,7 +108,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.32-dev-15'; + const SMARTY_VERSION = '3.1.32-dev-16'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_runtime_writefile.php b/libs/sysplugins/smarty_internal_runtime_writefile.php index 84de56747..ffa0b51e9 100644 --- a/libs/sysplugins/smarty_internal_runtime_writefile.php +++ b/libs/sysplugins/smarty_internal_runtime_writefile.php @@ -47,6 +47,7 @@ public function writeFile($_filepath, $_contents, Smarty $smarty) if (@mkdir($_dirpath, $_dir_perms, true)) { break; } + clearstatcache(); if (++$i === 3) { error_reporting($_error_reporting); throw new SmartyException("unable to create directory {$_dirpath}");