From 1e07f8c045decda6a1d71f5551dd1357a5af0bc3 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Fri, 4 Sep 2015 20:35:11 +0200 Subject: [PATCH] Incorrect use of DataObject type matching after ->find() --- classes/Conversation.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/classes/Conversation.php b/classes/Conversation.php index 537c214a4c..9ef1e06b76 100644 --- a/classes/Conversation.php +++ b/classes/Conversation.php @@ -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); }