Skip to content

Commit

Permalink
Fixed subscriber overview on upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens committed Aug 26, 2024
1 parent 6dd5b02 commit a843f17
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/controllers/SubscriptionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,21 @@ public function actionGetSubscribers()

$rows = $subscribers->all();

if(!$rows) {
return $this->asJson([
'pagination' => [
'total' => (int)0,
'per_page' => (int)20,
'current_page' => (int)0,
'last_page' => (int)0,
'next_page_url' => '',
'prev_page_url' => '',
'from' => (int)0,
'to' => (int)0,
],
'data' => [],
]);
}

$total = count($rows);
$limit = $total < 20 ? $total : 20;
Expand Down

0 comments on commit a843f17

Please sign in to comment.