Skip to content

Commit

Permalink
fix: adhoc field with null value php81 issue, #339
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez committed Apr 27, 2022
1 parent ee8ad64 commit 4e46eba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ function type($val) {
function value($type,$val) {
switch ($type) {
case self::PARAM_FLOAT:
if (!is_string($val))
$val=str_replace(',','.',$val);
if (!is_string($val) && $val !== NULL)
$val=str_replace(',','.',(string) $val);
return $val;
case \PDO::PARAM_NULL:
return NULL;
Expand Down

0 comments on commit 4e46eba

Please sign in to comment.