- bugfix avoid opcache_invalidate to result in ErrorException when opcache.restrict_api is not empty https://github.com/smarty-php/smarty/pull/244

This commit is contained in:
uwetews
2016-07-18 19:45:30 +02:00
parent 92945eaf12
commit d854219696
6 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
*/
private function loadCompiledTemplate(Smarty_Internal_Template $_smarty_tpl)
{
if (function_exists('opcache_invalidate')) {
if (function_exists('opcache_invalidate') && strlen(ini_get("opcache.restrict_api")) < 1) {
opcache_invalidate($this->filepath, true);
} elseif (function_exists('apc_compile_file')) {
apc_compile_file($this->filepath);