mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
#51 preg_match()를 substr_compare() 또는 strncmp()로 대체
This commit is contained in:
parent
681a9b2d07
commit
63e0fd6f3b
20 changed files with 68 additions and 61 deletions
|
|
@ -295,7 +295,7 @@ class documentItem extends Object
|
|||
$url = trim($this->get('homepage'));
|
||||
if(!$url) return;
|
||||
|
||||
if(!preg_match("/^http:\/\//i",$url)) $url = "http://".$url;
|
||||
if(strncasecmp('http://', $url, 7) !== 0 && strncasecmp('https://', $url, 8) !== 0) $url = 'http://' . $url;
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue