Skip to content

Commit 7f6469c

Browse files
committed
Fixed domains .com.country close #25
1 parent 4f806f5 commit 7f6469c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Embed/Url.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ public function getDomain($first_level = false)
149149

150150
default:
151151
if ($first_level) {
152-
return ($host[1] === 'co') ? ($host[2].'.'.$host[1].'.'.$host[0]) : ($host[1].'.'.$host[0]);
152+
return ($host[1] === 'co' || $host[1] === 'com') ? ($host[2].'.'.$host[1].'.'.$host[0]) : ($host[1].'.'.$host[0]);
153153
}
154154

155-
return ($host[1] === 'co') ? $host[2] : $host[1];
155+
return ($host[1] === 'co' || $host[1] === 'com') ? $host[2] : $host[1];
156156
}
157157
}
158158

0 commit comments

Comments
 (0)