From dc392cb8ad2bfe4ec698eb18c6c36b93af2bf2a7 Mon Sep 17 00:00:00 2001 From: Stefan Andres Charsley Date: Sun, 12 Jan 2014 22:52:35 +1300 Subject: FIX: Added parameter array checking Updated preg_match_all parameters. --- test/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/bootstrap.php b/test/bootstrap.php index 642e667..7256e51 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -24,7 +24,7 @@ class MockPDOStatement extends PDOStatement { public function execute($params) { $count = 0; $m = array(); - if (preg_match_all('/"[^"\\\\]*(?:\\?)[^"\\\\]*"|\'[^\'\\\\]*(?:\\?)[^\'\\\\]*\'|(\\?)/', $this->statement, $m)) { + if (preg_match_all('/"[^"\\\\]*(?:\\?)[^"\\\\]*"|\'[^\'\\\\]*(?:\\?)[^\'\\\\]*\'|(\\?)/', $this->statement, $m, PREG_SET_ORDER)) { $count = count($m); for ($i = 0; $i < $count; $i++) { if (!isset($params[$i])) { -- cgit v1.2.3