Skip to content

Commit

Permalink
Merge pull request #914 from City-of-Helsinki/UHF-9566
Browse files Browse the repository at this point in the history
UHF-9566: Fix deprecated call abs(): Passing null to parameter #1
  • Loading branch information
hyrsky authored Mar 1, 2024
2 parents 13dbc7a + 50c0668 commit ba0bbf8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hdbt.theme
Original file line number Diff line number Diff line change
Expand Up @@ -1329,9 +1329,8 @@ function hdbt_preprocess_views_view(&$variables): void {
$variables['pager_items_per_page'] = $variables['view']->pager->options['items_per_page'];
}
// Add total rows as a variable.
if ($variables['view']->total_rows != NULL) {
$variables['total_rows'] = $variables['view']->total_rows;
}
$variables['total_rows'] = $variables['view']->total_rows ?: 0;

if ($variables['view']->id() == 'service_list') {
$variables['is_ajax_request'] = \Drupal::request()->isXmlHttpRequest();
}
Expand Down

0 comments on commit ba0bbf8

Please sign in to comment.