From eeba32342901a54570dac279c3be68ea3b96fa5d Mon Sep 17 00:00:00 2001 From: fusionate Date: Fri, 9 Jun 2023 19:40:41 +0000 Subject: [PATCH] Number Translations: Update for PHP 8.1 --- app/number_translations/number_translations.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/number_translations/number_translations.php b/app/number_translations/number_translations.php index 60321966cf..2214467955 100644 --- a/app/number_translations/number_translations.php +++ b/app/number_translations/number_translations.php @@ -71,8 +71,9 @@ } //prepare the array - foreach($number_translations as $row) { - $array['number_translations'][$x]['checked'] = $row['checked']; + $x = 0; + foreach ($number_translations as $row) { + $array['number_translations'][$x]['checked'] = $row['checked'] ?? null; $array['number_translations'][$x]['number_translation_uuid'] = $row['number_translation_uuid']; $array['number_translations'][$x]['number_translation_enabled'] = $row['number_translation_enabled']; $x++;