Commit 1f5d7779 by Qiang Xue

Fixed test breaks.

parent 20bde29f
......@@ -111,7 +111,7 @@ class QueryBuilder extends \yii\base\Object
} else {
$phName = self::PARAM_PREFIX . count($params);
$placeholders[] = $phName;
$params[$phName] = isset($columnSchemas[$name]) ? $columnSchemas[$name]->typecast($value) : $value;
$params[$phName] = !is_array($value) && isset($columnSchemas[$name]) ? $columnSchemas[$name]->typecast($value) : $value;
}
}
......@@ -185,7 +185,7 @@ class QueryBuilder extends \yii\base\Object
} else {
$phName = self::PARAM_PREFIX . count($params);
$lines[] = $this->db->quoteColumnName($name) . '=' . $phName;
$params[$phName] = isset($columnSchemas[$name]) ? $columnSchemas[$name]->typecast($value) : $value;
$params[$phName] = !is_array($value) && isset($columnSchemas[$name]) ? $columnSchemas[$name]->typecast($value) : $value;
}
}
......
......@@ -175,7 +175,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
foreach ($rows as $row) {
$vs = array();
foreach ($row as $i => $value) {
if (isset($columnSchemas[$columns[$i]])) {
if (!is_array($value) && isset($columnSchemas[$columns[$i]])) {
$value = $columnSchemas[$columns[$i]]->typecast($value);
}
$vs[] = is_string($value) ? $this->db->quoteValue($value) : $value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment