From e783f6113251732e8d3c45c19cdcaf3c0a93d9c3 Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 9 Dec 2015 02:03:56 +0100 Subject: [PATCH] - bugix Smarty did fail under PHP 7.0.0 with use_include_path = true; --- change_log.txt | 3 +++ libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_runtime_getincludepath.php | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index 850f3809..e9472f45 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 3.1.28-dev===== (xx.xx.2015) + 09.12.2015 + - bugix Smarty did fail under PHP 7.0.0 with use_include_path = true; + 09.12.2015 -bugfix {strip} should exclude some html tags from stripping, related to fix for https://github.com/smarty-php/smarty/issues/111 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 27455b17..e4fc9473 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.28-dev/78'; + const SMARTY_VERSION = '3.1.28-dev/79'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_runtime_getincludepath.php b/libs/sysplugins/smarty_internal_runtime_getincludepath.php index 965c95f8..81253e8e 100644 --- a/libs/sysplugins/smarty_internal_runtime_getincludepath.php +++ b/libs/sysplugins/smarty_internal_runtime_getincludepath.php @@ -86,11 +86,11 @@ class Smarty_Internal_Runtime_GetIncludePath $this->_include_path = $_i_path; $_dirs = (array) explode(PATH_SEPARATOR, $_i_path); foreach ($_dirs as $_path) { - if ($_path[0] != '/' && isset($dir[1]) && $dir[1] != ':') { + if (isset($_path[0]) && $_path[0] != '/' && isset($_path[1]) && $_path[1] != ':') { $_path = $smarty->_realpath($_path . DS, true); } if (is_dir($_path)) { - $this->_include_dirs[] = $smarty->_realpath($_path . DS, true); + $this->_include_dirs[] =$_path; } } return true;