File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -121,23 +121,10 @@ public function parseHost($host)
121121 {
122122 $ host = mb_strtolower ($ host , 'UTF-8 ' );
123123
124- $ subdomain = null ;
125- $ registrableDomain = null ;
126- $ publicSuffix = null ;
127-
128- // Fixes #22: Single label domains are set as Host::$host and all other
129- // properties are null.
130- // Fixes #43: Ip Addresses should not be parsed
131- if ($ this ->isMultiLabelDomain ($ host ) || !$ this ->isIpv4Address ($ host )) {
132- $ subdomain = $ this ->getSubdomain ($ host );
133- $ registrableDomain = $ this ->getRegistrableDomain ($ host );
134- $ publicSuffix = $ this ->getPublicSuffix ($ host );
135- }
136-
137124 return new Host (
138- $ subdomain ,
139- $ registrableDomain ,
140- $ publicSuffix ,
125+ $ this -> getSubdomain ( $ host ) ,
126+ $ this -> getRegistrableDomain ( $ host ) ,
127+ $ this -> getPublicSuffix ( $ host ) ,
141128 $ host
142129 );
143130 }
@@ -259,7 +246,7 @@ public function isSuffixValid($host)
259246 */
260247 public function getRegistrableDomain ($ host )
261248 {
262- if (strpos ($ host, ' . ' ) === false ) {
249+ if (! $ this -> isMultiLabelDomain ($ host) ) {
263250 return ;
264251 }
265252
You can’t perform that action at this time.
0 commit comments