No need to test if it's empty when we're running foreach

This commit is contained in:
Mikael Nordfeldth 2015-01-18 14:18:19 +01:00
parent eacf063b0f
commit 0d6318c92b

View File

@ -39,7 +39,7 @@ if (!defined('STATUSNET')) {
class ApiQvitterNotificationsAction extends ApiPrivateAuthAction
{
var $notifications = null;
var $notifications = array();
var $notices = null;
var $profiles = null;
@ -87,8 +87,6 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction
$notifications_populated = array();
if(!empty($this->notifications)) {
foreach($this->notifications as $notification) {
@ -128,8 +126,6 @@ class ApiQvitterNotificationsAction extends ApiPrivateAuthAction
$notification->update();
}
}
}
$this->initDocument('json');
$this->showJsonObjects($notifications_populated);