Skip to content

Commit

Permalink
use self as fallback #140
Browse files Browse the repository at this point in the history
  • Loading branch information
dantheta committed May 11, 2021
1 parent d72870f commit 0ab98ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/1.2/libs/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ function get_related($url) {


function get_preferred_domain_url($url) {
$urlobj = $this->load(preferred_domain_url($url['url']));
try {
$urlobj = $this->load(preferred_domain_url($url['url']));
} catch (UrlLookupError)
return null;
}

return $urlobj;
}
Expand Down

0 comments on commit 0ab98ba

Please sign in to comment.