Commit 5ce5387d authored by Guy Thouret's avatar Guy Thouret

(fix) Fix issue with null offset being set in boost feed api - #930

1 merge request!235WIP: Boost Campaigns (&24)
Pipeline #90740282 failed with stages
in 14 minutes and 3 seconds
......@@ -44,7 +44,7 @@ class feed implements Interfaces\Api
$this->type = $pages[0] ?? 'newsfeed';
if ($this->isBoostFeed) {
$this->offset = $_GET['from_timestamp'] ?: 0;
$this->offset = $_GET['from_timestamp'] ?? 0;
}
switch ($this->type) {
......@@ -62,7 +62,7 @@ class feed implements Interfaces\Api
protected function parseAndValidateParams(): bool
{
$this->limit = abs(intval($_GET['limit'] ?? 2));
$this->offset = $_GET['offset'] ?? null;
$this->offset = $_GET['offset'] ?? 0;
$this->rating = intval($_GET['rating'] ?? $this->currentUser->getBoostRating());
$this->platform = $_GET['platform'] ?? 'other';
$this->isBoostFeed = $_GET['boostfeed'] ?? false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment