mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 01:54:00 +02:00
Use is_numeric()
This commit is contained in:
@@ -845,7 +845,7 @@ class Adminer {
|
|||||||
foreach ($row as $key => $val) {
|
foreach ($row as $key => $val) {
|
||||||
$field = $fields[$key];
|
$field = $fields[$key];
|
||||||
$row[$key] = ($val !== null
|
$row[$key] = ($val !== null
|
||||||
? unconvert_field($field, preg_match(number_type(), $field["type"]) && !preg_match('~\[~', $field["full_type"]) && preg_match('~^([0-9]*\.)?[0-9]+$~', $val) ? $val : q(($val === false ? 0 : $val)))
|
? unconvert_field($field, preg_match(number_type(), $field["type"]) && !preg_match('~\[~', $field["full_type"]) && is_numeric($val) ? $val : q(($val === false ? 0 : $val)))
|
||||||
: "NULL"
|
: "NULL"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user