1
1
Fork 0

Fix wrong condition in Diaspora\Fetch

This commit is contained in:
Hypolite Petovan 2020-07-11 09:18:42 -04:00
parent 32a8f5003f
commit 2af20ea17a

View file

@ -59,7 +59,7 @@ class Fetch extends BaseModule
if (empty($item)) {
$condition = ['guid' => $guid, 'network' => [Protocol::DFRN, Protocol::DIASPORA]];
$item = Item::selectFirst(['author-link'], $condition);
if (empty($item)) {
if (!empty($item["author-link"])) {
$parts = parse_url($item["author-link"]);
if (empty($parts["scheme"]) || empty($parts["host"])) {
throw new HTTPException\InternalServerErrorException();