Fix per PHP 8.1
This commit is contained in:
parent
289d99cc7c
commit
9313e08351
|
@ -40,7 +40,8 @@ if (!empty($id_record)) {
|
|||
Util\Query::setSegments(true);
|
||||
}
|
||||
// Rimozione della condizione deleted_at IS NULL per visualizzare anche i record eliminati
|
||||
if (preg_match('/[`]*([a-z0-9_]*)[`]*[\.]*([`]*deleted_at[`]* IS NULL)/i', $query, $m)) {
|
||||
if (!empty($query)){
|
||||
if (preg_match('/[`]*([a-z0-9_]*)[`]*[\.]*([`]*deleted_at[`]* IS NULL)/i', $query, $m)) {
|
||||
$conditions_to_remove = [];
|
||||
|
||||
$condition = trim($m[0]);
|
||||
|
@ -54,6 +55,7 @@ if (preg_match('/[`]*([a-z0-9_]*)[`]*[\.]*([`]*deleted_at[`]* IS NULL)/i', $quer
|
|||
|
||||
$query = str_replace($conditions_to_remove, '', $query);
|
||||
$query = str_replace($condition, '', $query);
|
||||
}
|
||||
}
|
||||
|
||||
$has_access = !empty($query) ? $dbo->fetchNum($query) !== 0 : true;
|
||||
|
|
|
@ -511,7 +511,7 @@ if (Auth::check()) {
|
|||
$count = 0;
|
||||
if (!empty($plugin['options2'])){
|
||||
$opt = json_decode($plugin['options2'], true);
|
||||
}else{
|
||||
}else if (!empty($plugin['options'])){
|
||||
$opt = json_decode($plugin['options'], true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue