Fix per php8.1

This commit is contained in:
Pek5892 2024-04-11 11:17:03 +02:00
parent 97a3c0ef47
commit 6809ca0ce3
12 changed files with 16 additions and 14 deletions

View File

@ -33,7 +33,7 @@ echo '
<input type="hidden" name="backto" value="record-edit"> <input type="hidden" name="backto" value="record-edit">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">

View File

@ -48,7 +48,7 @@ $id_anagrafica = !empty(get('idanagrafica')) ? get('idanagrafica') : '';
<input type="hidden" name="dir" value="<?php echo $dir; ?>"> <input type="hidden" name="dir" value="<?php echo $dir; ?>">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">

View File

@ -42,7 +42,7 @@ $idtipodocumento = Tipo::where('predefined', 1)->where('dir', $dir)->first()->id
<input type="hidden" name="dir" value="<?php echo $dir; ?>"> <input type="hidden" name="dir" value="<?php echo $dir; ?>">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">

View File

@ -144,7 +144,7 @@ echo '
<input type="hidden" name="backto" value="record-edit"> <input type="hidden" name="backto" value="record-edit">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value="">'; <input type="hidden" name="id_record" value="0">';
if (!empty($id_promemoria_contratto)) { if (!empty($id_promemoria_contratto)) {
echo '<input type="hidden" name="idcontratto_riga" value="'.$id_promemoria_contratto.'">'; echo '<input type="hidden" name="idcontratto_riga" value="'.$id_promemoria_contratto.'">';

View File

@ -42,7 +42,7 @@ $id_anagrafica = !empty(get('idanagrafica')) ? get('idanagrafica') : '';
<input type="hidden" name="dir" value="<?php echo $dir; ?>"> <input type="hidden" name="dir" value="<?php echo $dir; ?>">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">

View File

@ -32,7 +32,7 @@ $stato = (new Stato())->getByField('name', 'Bozza', Models\Locale::getPredefined
<input type="hidden" name="backto" value="record-edit"> <input type="hidden" name="backto" value="record-edit">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">

View File

@ -26,7 +26,7 @@ echo '
<input type="hidden" name="op" value="add"> <input type="hidden" name="op" value="add">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">

View File

@ -56,7 +56,7 @@ echo '
<input type="hidden" name="op" value="addpagamento"> <input type="hidden" name="op" value="addpagamento">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">

View File

@ -27,7 +27,7 @@ echo '
<input type="hidden" name="op" value="addprovvigione"> <input type="hidden" name="op" value="addprovvigione">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">

View File

@ -27,7 +27,7 @@ echo '
<input type="hidden" name="op" value="addreferente"> <input type="hidden" name="op" value="addreferente">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">

View File

@ -28,7 +28,7 @@ echo '
<input type="hidden" name="op" value="addsede"> <input type="hidden" name="op" value="addsede">
<!-- Fix creazione da Anagrafica --> <!-- Fix creazione da Anagrafica -->
<input type="hidden" name="id_record" value=""> <input type="hidden" name="id_record" value="0">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">

View File

@ -43,13 +43,15 @@ class Filter
public static function getValue($property, $method = null, $raw = false) public static function getValue($property, $method = null, $raw = false)
{ {
$value = null; $value = null;
$post = self::post($property, $raw);
$get = self::get($property, $raw);
if (empty($method)) { if (empty($method)) {
$value = self::post($property, $raw) ?: self::get($property, $raw); $value = (!empty($post) || $post == '0') ? $post : $get;
} elseif (strtolower($method) == 'post') { } elseif (strtolower($method) == 'post') {
$value = self::post($property, $raw); $value = $post;
} elseif (strtolower($method) == 'get') { } elseif (strtolower($method) == 'get') {
$value = self::get($property, $raw); $value = $get;
} }
return $value; return $value;