diff --git a/core/database.php b/core/database.php index 3bead690..bc002bcb 100644 --- a/core/database.php +++ b/core/database.php @@ -213,7 +213,7 @@ class Database // $stmt = $this->db->prepare($query); if (!array_key_exists(0, $args)) { foreach ($args as $name=>$value) { - if (is_numeric($value)) { + if (is_int($value)) { $stmt->bindValue(':'.$name, $value, PDO::PARAM_INT); } else { $stmt->bindValue(':'.$name, $value, PDO::PARAM_STR); diff --git a/core/imageboard/image.php b/core/imageboard/image.php index 33804a60..c757e334 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -81,9 +81,9 @@ class Image } $this->locked = bool_escape($this->locked); - assert(is_numeric($this->id)); - assert(is_numeric($this->height)); - assert(is_numeric($this->width)); + assert(is_int($this->id)); + assert(is_int($this->height)); + assert(is_int($this->width)); } } diff --git a/core/polyfills.php b/core/polyfills.php index c39ec13a..4f0b2c71 100644 --- a/core/polyfills.php +++ b/core/polyfills.php @@ -503,7 +503,7 @@ function bool_escape($input): bool */ if (is_bool($input)) { return $input; - } elseif (is_numeric($input)) { + } elseif (is_int($input)) { return ($input === 1); } else { $value = filter_var($input, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);