From 6bbba84a0bc201e5319caf5dab2250f7405d2c4a Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Tue, 9 Jan 2024 15:03:24 +0200 Subject: [PATCH] Fix deprecation error in views-view--job-listing-search.html.twig Log files are spammed with following message: Deprecated function: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in __TwigTemplate_a50c131c592f73c06c175405fb05a903->doDisplay() (line 95 of \/tmp\/twig\/659d1db0ccb1e_views-view--job-listing-s_znAVFe4YirBkQ_LpLSJME5eiO\/XkctdSAE01NPFXVKj5fZW-_T-UvHDkkE39mbf3EmiOc.php) --- .../templates/views/views-view--job-listing-search.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--job-listing-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--job-listing-search.html.twig index cfbb3fb8..c3383333 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--job-listing-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--job-listing-search.html.twig @@ -55,8 +55,8 @@
- {{ total_rows }} - {% trans with {'context': 'Job listing search count'}%}open job listing{% plural total_rows %}open job listings{% endtrans %} + {{ total_rows ?? 0 }} + {% trans with {'context': 'Job listing search count'}%}open job listing{% plural total_rows ?? 0 %}open job listings{% endtrans %}