From 7ee1edb37bef1e8679add17b6b9446ad19a890da Mon Sep 17 00:00:00 2001 From: Stefan Andres Charsley Date: Sun, 12 Jan 2014 23:11:16 +1300 Subject: FIX: Added parameter array checking Remove some empty results from the array before checking. --- test/bootstrap.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/bootstrap.php b/test/bootstrap.php index 7256e51..9a40762 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -25,6 +25,10 @@ class MockPDOStatement extends PDOStatement { $count = 0; $m = array(); if (preg_match_all('/"[^"\\\\]*(?:\\?)[^"\\\\]*"|\'[^\'\\\\]*(?:\\?)[^\'\\\\]*\'|(\\?)/', $this->statement, $m, PREG_SET_ORDER)) { + $count = count($m); + for ($v = 0; $v < $count; $v++) { + if (count($m[$v]) == 1) unset($m[$v]); + } $count = count($m); for ($i = 0; $i < $count; $i++) { if (!isset($params[$i])) { -- cgit v1.2.3