]> git.mxchange.org Git - friendica.git/commitdiff
Fix PHP Notice in new OEmbed class
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 2 Jan 2018 13:20:33 +0000 (08:20 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Tue, 2 Jan 2018 13:20:33 +0000 (08:20 -0500)
src/Content/OEmbed.php

index 020d3b9b76a06b331e8c82baad2a3f0c875fca45..70be8fd73865b9a04e221eedbc429e566dd238a6 100644 (file)
@@ -100,7 +100,7 @@ class OEmbed
 \r
                        $txt = trim($txt);\r
 \r
-                       if ($txt[0] != "{") {\r
+                       if (!$txt || $txt[0] != "{") {\r
                                $txt = '{"type":"error"}';\r
                        } else { //save in cache\r
                                $j = json_decode($txt);\r