File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1010use Embed \Http \Url ;
1111use Embed \Providers \Provider ;
1212use Embed \Utils ;
13+ use Exception ;
1314
1415/**
1516 * Base class extended by all adapters.
@@ -317,7 +318,11 @@ public function getUrl()
317318 return $ this ->getFirstFromProviders (function (Provider $ provider ) use ($ blacklist , $ homeUrl ) {
318319 $ url = $ provider ->getUrl ();
319320
320- if ($ homeUrl === $ url || (!empty ($ blacklist ) && Url::create ($ url )->match ($ blacklist ))) {
321+ try {
322+ if ($ homeUrl === $ url || (!empty ($ blacklist ) && Url::create ($ url )->match ($ blacklist ))) {
323+ return false ;
324+ }
325+ } catch (Exception $ error ) {
321326 return false ;
322327 }
323328
Original file line number Diff line number Diff line change @@ -621,7 +621,7 @@ private static function getSuffixes()
621621 {
622622 if (self ::$ public_suffix_list === null ) {
623623 self ::$ public_suffix_list = (array ) include __DIR__ .'/../resources/public_suffix_list.php ' ;
624- }
624+ }
625625 return self ::$ public_suffix_list ;
626626 }
627627
You can’t perform that action at this time.
0 commit comments