]> git.mxchange.org Git - friendica.git/commitdiff
Some more notices removed
authorMichael <heluecht@pirati.ca>
Sun, 29 Jul 2018 04:04:23 +0000 (04:04 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 29 Jul 2018 04:04:23 +0000 (04:04 +0000)
src/Content/OEmbed.php
src/Model/Profile.php

index a1fe4f30649b107e118ab8c87b09fa781863f0c2..0c05b010866dd331d04785fcdcf136e8a7d2de81 100644 (file)
@@ -152,7 +152,7 @@ class OEmbed
                                $oembed->description = $data['text'];
                        }
 
-                       if (is_array($data['images'])) {
+                       if (!empty($data['images'])) {
                                $oembed->thumbnail_url = $data['images'][0]['src'];
                                $oembed->thumbnail_width = $data['images'][0]['width'];
                                $oembed->thumbnail_height = $data['images'][0]['height'];
index 15ad83ed85f60dd916ff528c6fb27a7afd497af0..5180a3ea2e002fcc9f4b8daf5b5cdffcdfd73140 100644 (file)
@@ -116,6 +116,10 @@ class Profile
                        return;
                }
 
+               if (empty($pdata)) {
+                       $pdata = ['uid' => 0, 'profile_uid' => 0, 'is-default' => false,'name' => $nickname];
+               }
+
                // fetch user tags if this isn't the default profile
 
                if (!$pdata['is-default']) {