diff options
author | Stefan Andres Charsley <[email protected]> | 2014-01-12 21:23:14 +1300 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2014-04-26 13:27:54 +0100 |
commit | f70b50e308092c15d446f4e6377238badf6dee9c (patch) | |
tree | bc49e51052c550cf9b2578065ffb9d3b06dc4352 /test | |
parent | 44bdab3e380d1c00de10797b396c5f38b9b9155d (diff) |
FIX: Added parameter array checking
Fixed the regex not having backslashes escaped.
Diffstat (limited to 'test')
-rw-r--r-- | test/bootstrap.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/bootstrap.php b/test/bootstrap.php index d541e7b..18ae16b 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)) { $count = count($m); for ($i = 0; $i < $count; $i++) { if ($params[$i] == NULL) throw new Exception('Incorrect parameter count.'); |