]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add check after oembed API call. In case of error, returned value is false which...
authorJean Baptiste Favre <github@jbfavre.org>
Tue, 25 Feb 2014 22:31:09 +0000 (23:31 +0100)
committerJean Baptiste Favre <github@jbfavre.org>
Sun, 2 Mar 2014 14:06:06 +0000 (15:06 +0100)
classes/File.php

index a5914b506e670f414e23a33b5de65a87fdbeebeb..db80159d3ba181b80276f8eb5d072942a241f94b 100644 (file)
@@ -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) {