改进Connection类connect方法的异常处理 改进Query类一处可能的问题

This commit is contained in:
thinkphp
2016-08-11 14:00:24 +08:00
parent c19d404606
commit 5a612058ef
2 changed files with 6 additions and 4 deletions

View File

@@ -747,7 +747,7 @@ class Query
}
if (isset($this->options['field'])) {
$field = array_merge($this->options['field'], $field);
$field = $this->options['field'] + $field;
}
$this->options['field'] = $field;
return $this;
@@ -1415,8 +1415,10 @@ class Query
{
$types = $this->getFieldsType($options);
$bind = [];
foreach ($types as $key => $type) {
$bind[$key] = $this->getFieldBindType($type);
if ($types) {
foreach ($types as $key => $type) {
$bind[$key] = $this->getFieldBindType($type);
}
}
return $bind;
}