forked from GNUsocial/gnu-social
Add check after oembed API call. In case of error, returned value is false which generate error messages 'Trying to get property of non-object'.
This commit is contained in:
parent
8b04bcb310
commit
29f0922705
@ -116,7 +116,9 @@ class File extends Managed_DataObject
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if ($oembed_data === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$fo = File_oembed::getKV('file_id', $this->id);
|
$fo = File_oembed::getKV('file_id', $this->id);
|
||||||
|
|
||||||
if ($fo instanceof File_oembed) {
|
if ($fo instanceof File_oembed) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user