Incorrect use of DataObject type matching after ->find()

This commit is contained in:
Mikael Nordfeldth 2015-09-04 20:35:11 +02:00
parent 57c87088d4
commit 1e07f8c045

View 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);
}