修正\think\db\Driver一处可能的BUG

This commit is contained in:
thinkphp
2016-02-02 00:03:10 +08:00
parent ab0b16103b
commit ac7eafe9e8

View File

@@ -15,9 +15,9 @@ use PDO;
use think\Config;
use think\Db;
use think\Debug;
use think\exception\DbBindParamException;
use think\exception\DbException;
use think\exception\PDOException;
use think\exception\DbBindParamException;
use think\Log;
abstract class Driver
@@ -266,7 +266,7 @@ abstract class Driver
// 判断占位符
$sql = is_numeric($key) ?
substr_replace($sql, $val, strpos($sql, '?'), 1) :
str_replace(':' . $key . ' ', $val . ' ', $sql);
str_replace(':' . $key . ' ', $val . ' ', $sql . ' ');
}
}
return $sql;