From c3785d8d8a229e5608afdbadca426b2dd58b51cc Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 20 Jan 2020 18:47:08 +0800 Subject: [PATCH] Update common.php --- function/common.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/function/common.php b/function/common.php index 4726831..197d259 100644 --- a/function/common.php +++ b/function/common.php @@ -72,11 +72,13 @@ function getListpath($domain) $tmp = explode("|",$domain_path1); foreach ($tmp as $multidomain_paths){ $pos = strpos($multidomain_paths,":"); - $domain1 = substr($multidomain_paths,0,$pos); - $tmp_path = path_format(substr($multidomain_paths,$pos+1)); - $domain_path[$domain1] = $tmp_path; - if ($public_path=='') $public_path = $tmp_path; + if ($pos>0) { + $domain1 = substr($multidomain_paths,0,$pos); + $tmp_path = path_format(substr($multidomain_paths,$pos+1)); + $domain_path[$domain1] = $tmp_path; + if ($public_path=='') $public_path = $tmp_path; //if (substr($multidomain_paths,0,$pos)==$host_name) $private_path=$tmp_path; + } } } if (isset($domain_path[$domain])) return spurlencode($domain_path[$domain],'/');