[api.core.checker] now for 'varchar()' type, pass numeric -> string before checking 'strlen()' (because of json_decode)

This commit is contained in:
xdrm-brackets 2018-03-12 10:42:19 +01:00
parent a0d2ca65f9
commit 1aab7b61bd
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,10 @@
// On recupere le sous-type si défini // On recupere le sous-type si défini
$flags = isset($match[3]) ? explode(',', substr($match[3], 1)) : null; $flags = isset($match[3]) ? explode(',', substr($match[3], 1)) : null;
// Si numeric -> to String
if( is_numeric($value) )
$value = (string) $value;
// On effectue la verification de taille // On effectue la verification de taille
$lenCheck = $checker && is_string($value) && strlen($value) <= $max && strlen($value) >= $min; $lenCheck = $checker && is_string($value) && strlen($value) <= $max && strlen($value) >= $min;