summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorStefan Andres Charsley <[email protected]>2014-01-12 23:11:16 +1300
committerSimon Holywell <[email protected]>2014-04-26 13:27:54 +0100
commit7ee1edb37bef1e8679add17b6b9446ad19a890da (patch)
tree4765cea6dffbbc958a99f2beece4756e0e819238 /test
parentdc392cb8ad2bfe4ec698eb18c6c36b93af2bf2a7 (diff)
FIX: Added parameter array checking
Remove some empty results from the array before checking.
Diffstat (limited to 'test')
-rw-r--r--test/bootstrap.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/bootstrap.php b/test/bootstrap.php
index 7256e51..9a40762 100644
--- a/test/bootstrap.php
+++ b/test/bootstrap.php
@@ -26,6 +26,10 @@ class MockPDOStatement extends PDOStatement {
$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])) {
ob_start();