From df5aa6f93ab29312ec93f3d8746b63da870d9006 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 21 Oct 2013 09:09:32 +0200 Subject: [PATCH] Exception wasn't thrown. How does PHP handle daisychained calls, really? --- classes/Notice.php | 3 ++- plugins/Xmpp/XmppPlugin.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 2de4a889fa..65b0d66857 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1317,7 +1317,8 @@ class Notice extends Managed_DataObject // If it's a reply, save for the replied-to author try { - $author = $this->getParent()->getProfile(); + $parent = $this->getParent(); + $author = $parent->getProfile(); if ($author instanceof Profile) { $this->saveReply($author->id); $replied[$author->id] = 1; diff --git a/plugins/Xmpp/XmppPlugin.php b/plugins/Xmpp/XmppPlugin.php index 8b337a5f27..0c414998e0 100644 --- a/plugins/Xmpp/XmppPlugin.php +++ b/plugins/Xmpp/XmppPlugin.php @@ -346,7 +346,8 @@ class XmppPlugin extends ImPlugin $xs->elementStart('body', array('xmlns' => 'http://www.w3.org/1999/xhtml')); $xs->element('a', array('href' => $profile->profileurl), $profile->nickname); try { - $orig_profile = $notice->getParent()->getProfile(); + $parent = $notice->getParent(); + $orig_profile = $parent->getProfile(); $orig_profurl = $orig_profile->getUrl(); $xs->text(" => "); $xs->element('a', array('href' => $orig_profurl), $orig_profile->nickname); -- 2.39.2