1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-16 19:40:44 +01:00

Fix del bug #30

Aggiunta di un controllo per evitare la conversione erronea di numeri particolari (Partita IVA, ...) nel caso sia utilizzata l'estensione intl.
This commit is contained in:
Thomas Zilio 2017-09-28 12:05:10 +02:00
parent 6a6a9a64a4
commit 4d5453940a

View File

@ -150,7 +150,8 @@ class Formatter
} }
// Controllo sull'effettiva natura del numero // Controllo sull'effettiva natura del numero
if (!ctype_digit(str_replace(array_values($this->getNumberSeparators()), '', $value))) { $integer = str_replace(array_values($this->getNumberSeparators()), '', $value);
if (!ctype_digit($integer) || (strlen($integer) != strlen((int) $integer))) {
return false; return false;
} }