]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Exception wasn't thrown. How does PHP handle daisychained calls, really?
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Oct 2013 07:09:32 +0000 (09:09 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Oct 2013 07:09:32 +0000 (09:09 +0200)
classes/Notice.php
plugins/Xmpp/XmppPlugin.php

index 2de4a889fa408ad79dfef2b0871cc7afdb527640..65b0d668570d4f4010271ae4f48448113f235a9b 100644 (file)
@@ -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;
index 8b337a5f2713a7c91bc2c54dbd61651f14b1ccd9..0c414998e0d47ca313f8d6bfab563cbc3638fe38 100644 (file)
@@ -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);