Fix PHP 8.1
This commit is contained in:
parent
8e8971fedf
commit
c8215016e1
|
@ -33,7 +33,7 @@ echo '
|
||||||
// Quantità
|
// Quantità
|
||||||
echo '
|
echo '
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{[ "type": "number", "label": "'.tr('Q.tà').'", "name": "qta", "required": 1, "value": "'.abs($result['qta']).'", "decimals": "qta"'.(isset($result['max_qta']) ? ', "icon-after": "<span class=\"tip\" title=\"'.tr("L'elemento è collegato a un documento: la quantità massima ammessa è relativa allo stato di evasione dell'elemento nel documento di origine (quantità dell'elemento / quantità massima ammessa)").'\">/ '.numberFormat(abs($result['max_qta']), 'qta').' <i class=\"fa fa-question-circle-o\"></i></span>"' : '').', "min-value": "'.abs($result['qta_evasa']).'" ]}
|
{[ "type": "number", "label": "'.tr('Q.tà').'", "name": "qta", "required": 1, "value": "'.abs((float) $result['qta']).'", "decimals": "qta"'.(isset($result['max_qta']) ? ', "icon-after": "<span class=\"tip\" title=\"'.tr("L'elemento è collegato a un documento: la quantità massima ammessa è relativa allo stato di evasione dell'elemento nel documento di origine (quantità dell'elemento / quantità massima ammessa)").'\">/ '.numberFormat(abs((float) $result['max_qta']), 'qta').' <i class=\"fa fa-question-circle-o\"></i></span>"' : '').', "min-value": "'.abs((float) $result['qta_evasa']).'" ]}
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
// Unità di misura
|
// Unità di misura
|
||||||
|
|
|
@ -46,7 +46,7 @@ function database()
|
||||||
*/
|
*/
|
||||||
function prepare($parameter)
|
function prepare($parameter)
|
||||||
{
|
{
|
||||||
return database()->prepare($parameter);
|
return database()->prepare((string) $parameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -390,7 +390,7 @@ class Database extends Util\Singleton
|
||||||
*/
|
*/
|
||||||
public function prepare($parameter)
|
public function prepare($parameter)
|
||||||
{
|
{
|
||||||
return $this->getPDO()->quote($parameter);
|
return $this->getPDO()->quote((string) $parameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -421,18 +421,16 @@ class Formatter
|
||||||
*/
|
*/
|
||||||
public function formatDate($value)
|
public function formatDate($value)
|
||||||
{
|
{
|
||||||
if (!empty($value)){
|
|
||||||
$object = DateTime::createFromFormat(static::$standards['date'], $value);
|
$object = DateTime::createFromFormat(static::$standards['date'], (string) $value);
|
||||||
|
|
||||||
// Fallback per la gestione dei timestamp
|
// Fallback per la gestione dei timestamp
|
||||||
$object = !is_object($object) ? DateTime::createFromFormat(static::$standards['timestamp'], $value) : $object;
|
$object = !is_object($object) ? DateTime::createFromFormat(static::$standards['timestamp'], (string) $value) : $object;
|
||||||
|
|
||||||
$result = is_object($object) ? $object->format($this->getDatePattern()) : false;
|
$result = is_object($object) ? $object->format($this->getDatePattern()) : false;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}else{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -122,7 +122,7 @@ class Generator
|
||||||
$pattern = str_replace(array_keys($replaces), array_values($values), $pattern);
|
$pattern = str_replace(array_keys($replaces), array_values($values), $pattern);
|
||||||
|
|
||||||
// Individuazione dei valori
|
// Individuazione dei valori
|
||||||
preg_match('/^'.$pattern.'/', $string, $m);
|
preg_match('/^'.$pattern.'/', (string) $string, $m);
|
||||||
|
|
||||||
return array_filter($m, 'is_string', ARRAY_FILTER_USE_KEY);
|
return array_filter($m, 'is_string', ARRAY_FILTER_USE_KEY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ $files = [
|
||||||
'templates\scadenzario\scadenzario.html',
|
'templates\scadenzario\scadenzario.html',
|
||||||
'templates\registro_iva\pdfgen.registro_iva.php',
|
'templates\registro_iva\pdfgen.registro_iva.php',
|
||||||
'templates\registro_iva\registroiva_body.html',
|
'templates\registro_iva\registroiva_body.html',
|
||||||
'templates\registro_iva\header.php',
|
|
||||||
'templates\registro_iva\body.php',
|
'templates\registro_iva\body.php',
|
||||||
'templates\preventivi_cons\body.php',
|
'templates\preventivi_cons\body.php',
|
||||||
'templates\contratti_cons\body.php',
|
'templates\contratti_cons\body.php',
|
||||||
|
|
Loading…
Reference in New Issue