null bugfix in notifications

This commit is contained in:
Hannes Mannerheim 2014-10-30 18:57:32 +01:00
parent 676ab4aba0
commit d045c79853

View File

@ -91,10 +91,18 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction
foreach($this->notifications as $notification) {
// all but follow has an notice
if($notification->ntype != 'follow') {
// we need a notice id here, skip this notification if notice id is null
if($notification->notice_id === null) {
continue;
}
else {
$notice = self::twitterSimpleStatusArray(Notice::getKV($notification->notice_id));
}
}
$notifications_populated[] = array(
'id'=> $notification->id,