Permalink
Browse files

Bug Fix: PDO parameter name

  • Loading branch information...
1 parent bf66ffa commit 64cd2ec48050af3d3c2c8edb70939497f633091e @c9s committed Apr 16, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 package.ini
  2. +1 −1 src/SQLBuilder/QueryBuilder.php
View
@@ -1,6 +1,6 @@
[package]
name = SQLBuilder
-version = 1.2.7
+version = 1.2.8
desc = SQL Builder
author = Yo-An Lin <cornelius.howl@gmail.com>
channel = pear.corneltek.com
@@ -645,7 +645,7 @@ public function getVars()
public function setPlaceHolderVar($key,$value)
{
if( $this->driver->placeholder && $this->driver->placeholder === 'named' ) {
- $key = str_replace( array('.') , '_' , $key );
+ $key = preg_replace('#\W+#','_', $key );
// a basic counter to avoid key confliction.
$i = 1;
while( isset($this->vars[':' . $key]) ) {

0 comments on commit 64cd2ec

Please sign in to comment.