From b040bee1d0d31404f6d207545d927fab6d82c5e5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 14 Oct 2018 07:17:15 -0400 Subject: [PATCH 1/2] [fromgplus] Fix Undefined property: stdClass::$published notice --- fromgplus/fromgplus.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 24ec46f3..89139ed1 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -526,12 +526,12 @@ function fromgplus_fetch($a, $uid) { if (function_exists("share_header")) $post .= share_header($item->object->actor->displayName, $item->object->actor->url, $item->object->actor->image->url, "", - DateTimeFormat::utc($item->object->published),$item->object->url); + DateTimeFormat::utc($item->published),$item->object->url); else $post .= "[share author='".str_replace("'", "'",$item->object->actor->displayName). "' profile='".$item->object->actor->url. "' avatar='".$item->object->actor->image->url. - "' posted='".DateTimeFormat::utc($item->object->published). + "' posted='".DateTimeFormat::utc($item->published). "' link='".$item->object->url."']"; $post .= fromgplus_html2bbcode($item->object->content); -- 2.43.5 From 375f625e837901c35169c8c3295be9c53f4f3ce8 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 14 Oct 2018 09:27:44 -0400 Subject: [PATCH 2/2] [fromgplus] Fix potentially missing attachments property in activity --- fromgplus/fromgplus.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 89139ed1..9dc48753 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -495,8 +495,9 @@ function fromgplus_fetch($a, $uid) { case "note": $post = fromgplus_html2bbcode($item->object->content); - if (is_array($item->object->attachments)) + if (!empty($item->object->attachments)) { $post .= fromgplus_handleattachments($a, $uid, $item, $item->object->content, false); + } $coord = ""; $location = ""; -- 2.43.5