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) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($oembed_data === false) {
|
||||
return false;
|
||||
}
|
||||
$fo = File_oembed::getKV('file_id', $this->id);
|
||||
|
||||
if ($fo instanceof File_oembed) {
|
||||
|
Loading…
Reference in New Issue
Block a user