From 29f8c70d9f2a06677b90ff793fc19cd68688c2b1 Mon Sep 17 00:00:00 2001 From: Luca Date: Tue, 22 Mar 2022 19:49:33 +0100 Subject: [PATCH] Adeguamenti PHP 8.1 --- lib/helpers.php | 3 ++- modules/aggiornamenti/database.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/helpers.php b/lib/helpers.php index 520c464e2..401890470 100755 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -46,7 +46,8 @@ function database() */ function prepare($parameter) { - return database()->prepare($parameter); + if (!empty($parameter)) + return database()->prepare($parameter); } /** diff --git a/modules/aggiornamenti/database.php b/modules/aggiornamenti/database.php index b4e4ac1f6..be070eb15 100644 --- a/modules/aggiornamenti/database.php +++ b/modules/aggiornamenti/database.php @@ -107,7 +107,7 @@ if (!empty($results)) { if (array_key_exists('current', $errors) && $errors['current'] == null) { echo ' -

'.tr('Tabella assente').'

'; +
'.tr('Tabella assente').'
'; continue; } @@ -127,7 +127,7 @@ if (!empty($results)) { '; foreach ($errors as $name => $diff) { - if (count($diff) == 1 && array_key_exists('type', $diff) && str_contains($diff['type']['expected'], $diff['type']['current'])) { + if (count($diff) == 1 && array_key_exists('type', $diff) && Str::contains($diff['type']['expected'], $diff['type']['current'])) { $class = 'info'; } else { $class = 'warning';