1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-03 09:17:37 +01:00

Adeguamenti PHP 8.1

This commit is contained in:
Luca 2022-03-22 19:49:33 +01:00
parent 9313e08351
commit 29f8c70d9f
2 changed files with 4 additions and 3 deletions

View File

@ -46,6 +46,7 @@ function database()
*/ */
function prepare($parameter) function prepare($parameter)
{ {
if (!empty($parameter))
return database()->prepare($parameter); return database()->prepare($parameter);
} }

View File

@ -107,7 +107,7 @@ if (!empty($results)) {
if (array_key_exists('current', $errors) && $errors['current'] == null) { if (array_key_exists('current', $errors) && $errors['current'] == null) {
echo ' echo '
<p>'.tr('Tabella assente').'</p>'; <div class="alert alert-danger" ><i class="fa fa-times"></i> '.tr('Tabella assente').'</div>';
continue; continue;
} }
@ -127,7 +127,7 @@ if (!empty($results)) {
<tbody>'; <tbody>';
foreach ($errors as $name => $diff) { 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'; $class = 'info';
} else { } else {
$class = 'warning'; $class = 'warning';