From 0e42e9c0e143002c605b5750db5f3b655b3508c5 Mon Sep 17 00:00:00 2001 From: Stefan Andres Charsley Date: Thu, 29 May 2014 18:57:18 +1200 Subject: Fixed testing logic. --- test/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/bootstrap.php b/test/bootstrap.php index fe98ad1..8790dc7 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -50,7 +50,7 @@ class MockPDOStatement extends PDOStatement { { // Do check on index, and type if (!is_int($index)) throw new Exception('Incorrect parameter type. Expected $index to be an integer.'); - if (!is_int($type) || $type != PDO::PARAM_STR || $type != PDO::PARAM_NULL || $type != PDO::PARAM_BOOL || $type != PDO::PARAM_INT) + if (!is_int($type) || ($type != PDO::PARAM_STR && $type != PDO::PARAM_NULL && $type != PDO::PARAM_BOOL && $type != PDO::PARAM_INT)) throw new Exception('Incorrect parameter type. Expected $type to be an integer.'); // Add param to array -- cgit v1.2.3