Incorrect use of DataObject type matching after ->find()
This commit is contained in:
parent
57c87088d4
commit
1e07f8c045
|
@ -110,8 +110,7 @@ class Conversation extends Managed_DataObject
|
||||||
{
|
{
|
||||||
$conv = new Conversation();
|
$conv = new Conversation();
|
||||||
$conv->id = $notice->conversation;
|
$conv->id = $notice->conversation;
|
||||||
$conv->find(true);
|
if (!$conv->find(true)) {
|
||||||
if (!$conv instanceof Conversation) {
|
|
||||||
common_debug('Conversation does not exist for notice ID: '.$notice->id);
|
common_debug('Conversation does not exist for notice ID: '.$notice->id);
|
||||||
throw new NoResultException($conv);
|
throw new NoResultException($conv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user