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 10
10
use Embed \Http \Url ;
11
11
use Embed \Providers \Provider ;
12
12
use Embed \Utils ;
13
+ use Exception ;
13
14
14
15
/**
15
16
* Base class extended by all adapters.
@@ -317,7 +318,11 @@ public function getUrl()
317
318
return $ this ->getFirstFromProviders (function (Provider $ provider ) use ($ blacklist , $ homeUrl ) {
318
319
$ url = $ provider ->getUrl ();
319
320
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 ) {
321
326
return false ;
322
327
}
323
328
Original file line number Diff line number Diff line change @@ -621,7 +621,7 @@ private static function getSuffixes()
621
621
{
622
622
if (self ::$ public_suffix_list === null ) {
623
623
self ::$ public_suffix_list = (array ) include __DIR__ .'/../resources/public_suffix_list.php ' ;
624
- }
624
+ }
625
625
return self ::$ public_suffix_list ;
626
626
}
627
627
You can’t perform that action at this time.
0 commit comments