Fix in MySQLiStatement.mapPlaceholders() Use strictly placeholder names started with A-z symbol.

This commit is contained in:
Alexander Demidov
2013-10-09 08:35:15 +04:00
parent 9a881f6560
commit 6890827f17

View File

@ -38,7 +38,7 @@ class MySQLiStatement extends DbStatement
protected function mapPlaceholders() protected function mapPlaceholders()
{ {
$matches = array(); $matches = array();
if(preg_match_all('/(\?|:[A-z0-9_]+)/u', $this->request, $matches, PREG_OFFSET_CAPTURE)) { if(preg_match_all('/(\?|:[A-z][A-z0-9_]*+)/u', $this->request, $matches, PREG_OFFSET_CAPTURE)) {
$noname = 0; $noname = 0;
foreach ($matches[0] as $id=>$match) { foreach ($matches[0] as $id=>$match) {
$match[2] = $matches[1][$id][0]; $match[2] = $matches[1][$id][0];