'id' => $this->target->id),
array('max_id' => $this->next_id))
: null;
- $lastNotice = $this->notices[0];
- $lastId = $lastNotice->id;
+
+ $prevExtra = array();
+ if (!empty($this->notices)) {
+ assert($this->notices[0] instanceof Notice);
+ $prevExtra['since_id'] = $this->notices[0]->id;
+ }
+
$prevUrl = common_local_url('ApiTimelineUser',
array('format' => $this->format,
'id' => $this->target->id),
- array('since_id' => $lastId));
+ $prevExtra);
$firstUrl = common_local_url('ApiTimelineUser',
array('format' => $this->format,
'id' => $this->target->id));
break;
default:
// TRANS: Client error displayed when coming across a non-supported API method.
- $this->clientError(_('API method not found.'), $code = 404);
+ $this->clientError(_('API method not found.'), 404);
}
}
* @return boolean true
*/
- function isReadOnly($args)
+ function isReadOnly(array $args=array())
{
return ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD');
}