1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-24 04:41:00 +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,7 +46,8 @@ function database()
*/
function prepare($parameter)
{
return database()->prepare($parameter);
if (!empty($parameter))
return database()->prepare($parameter);
}
/**

View File

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