Skip to content

Commit

Permalink
Deprecated ctype_digit expects string
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuBarba committed Mar 3, 2024
1 parent d25f3fa commit 605ec1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib_db.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Check variable type (convert if necessary)
function parseVal($dat) {
foreach ($dat as $key => $val) {
if ( ctype_digit( $val ) ) {
if ( ctype_digit((string)$val) ) {
$dat[ $key ] = intval( $val );
} elseif (is_numeric($val)) {
$dat[ $key ] = floatval( $val );
Expand Down

0 comments on commit 605ec1b

Please sign in to comment.