diff --git a/lib/common.lib.php b/lib/common.lib.php index a2457e008..4cbaf89d1 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -3712,12 +3712,12 @@ function is_include_path_check($path='', $is_input='') try { // whether $path is unix or not - $unipath = strlen($path)==0 || $path{0}!='/'; + $unipath = strlen($path)==0 || substr($path, 0, 1) != '/'; $unc = substr($path,0,2)=='\\\\'?true:false; // attempts to detect if path is relative in which case, add cwd if(strpos($path,':') === false && $unipath && !$unc){ $path=getcwd().DIRECTORY_SEPARATOR.$path; - if($path{0}=='/'){ + if(substr($path, 0, 1) == '/'){ $unipath = false; } }