From eab8a101e7a3fcbb41e01a574985e06c5a3775de Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 18 Oct 2018 02:40:38 +0200 Subject: Updating Smarty --- .../smarty_internal_runtime_getincludepath.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'lib/smarty3/sysplugins/smarty_internal_runtime_getincludepath.php') diff --git a/lib/smarty3/sysplugins/smarty_internal_runtime_getincludepath.php b/lib/smarty3/sysplugins/smarty_internal_runtime_getincludepath.php index 9eae182..5ae9830 100644 --- a/lib/smarty3/sysplugins/smarty_internal_runtime_getincludepath.php +++ b/lib/smarty3/sysplugins/smarty_internal_runtime_getincludepath.php @@ -39,7 +39,7 @@ class Smarty_Internal_Runtime_GetIncludePath /** * stream cache * - * @var string[] + * @var string[][] */ public $isFile = array(); @@ -81,13 +81,13 @@ class Smarty_Internal_Runtime_GetIncludePath public function isNewIncludePath(Smarty $smarty) { $_i_path = get_include_path(); - if ($this->_include_path != $_i_path) { + if ($this->_include_path !== $_i_path) { $this->_include_dirs = array(); $this->_include_path = $_i_path; - $_dirs = (array) explode(PATH_SEPARATOR, $_i_path); + $_dirs = (array)explode(PATH_SEPARATOR, $_i_path); foreach ($_dirs as $_path) { if (is_dir($_path)) { - $this->_include_dirs[] = $smarty->_realpath($_path . DS, true); + $this->_include_dirs[] = $smarty->_realpath($_path . DIRECTORY_SEPARATOR, true); } } return true; @@ -111,12 +111,11 @@ class Smarty_Internal_Runtime_GetIncludePath /** * Return full file path from PHP include_path * - * @param string[] $dirs - * @param string $file - * @param \Smarty $smarty + * @param string[] $dirs + * @param string $file + * @param \Smarty $smarty * * @return bool|string full filepath or false - * */ public function getIncludePath($dirs, $file, Smarty $smarty) { @@ -128,7 +127,7 @@ class Smarty_Internal_Runtime_GetIncludePath } // try PHP include_path foreach ($dirs as $dir) { - $dir_n = isset($this->number[ $dir ]) ? $this->number[ $dir ] : $this->number[ $dir ] = $this->counter ++; + $dir_n = isset($this->number[ $dir ]) ? $this->number[ $dir ] : $this->number[ $dir ] = $this->counter++; if (isset($this->isFile[ $dir_n ][ $file ])) { if ($this->isFile[ $dir_n ][ $file ]) { return $this->isFile[ $dir_n ][ $file ]; @@ -143,9 +142,9 @@ class Smarty_Internal_Runtime_GetIncludePath $dir = $this->_user_dirs[ $dir_n ]; } } else { - if ($dir[ 0 ] == '/' || $dir[ 1 ] == ':') { + if ($dir[ 0 ] === '/' || $dir[ 1 ] === ':') { $dir = str_ireplace(getcwd(), '.', $dir); - if ($dir[ 0 ] == '/' || $dir[ 1 ] == ':') { + if ($dir[ 0 ] === '/' || $dir[ 1 ] === ':') { $this->_user_dirs[ $dir_n ] = false; continue; } -- cgit v1.2.3