]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Incorrect use of DataObject type matching after ->find()
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 4 Sep 2015 18:35:11 +0000 (20:35 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 4 Sep 2015 18:35:11 +0000 (20:35 +0200)
classes/Conversation.php

index 537c214a4c21991b54a20fea942a5c6a0ff2c325..9ef1e06b76a73d14d789c580dd8b6652553baf84 100644 (file)
@@ -110,8 +110,7 @@ class Conversation extends Managed_DataObject
     {
         $conv = new Conversation();
         $conv->id = $notice->conversation;
-        $conv->find(true);
-        if (!$conv instanceof Conversation) {
+        if (!$conv->find(true)) {
             common_debug('Conversation does not exist for notice ID: '.$notice->id);
             throw new NoResultException($conv);
         }