From bc384208016abd2e4ec04dee1f9c6ffd5ced90d2 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 29 Jul 2018 04:04:23 +0000 Subject: [PATCH] Some more notices removed --- src/Content/OEmbed.php | 2 +- src/Model/Profile.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index a1fe4f306..0c05b0108 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -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']; diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 15ad83ed8..5180a3ea2 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -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']) {