From 1eb1427de40247f6224b7a82a5833569a960372a Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 24 Oct 2013 21:31:05 +0200 Subject: [PATCH] Fix float casting bug --- include.mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include.mysql.php b/include.mysql.php index 1ef5a39..e71fe4b 100644 --- a/include.mysql.php +++ b/include.mysql.php @@ -43,7 +43,7 @@ class CachedPDO extends PDO { $type = $this->GuessType($value); - if(preg_match("/^[0-9]+$/", $value) && $type == PDO::PARAM_STR) + if(preg_match("/^[0-9]+$/", $value) && is_string($value)) { /* PDO library apparently thinks it's part of a strongly typed language and doesn't do any typecasting. * We'll do it ourselves then. */