mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
写入数据为对象的时候检测是否有__toString方法
This commit is contained in:
@@ -118,6 +118,9 @@ abstract class Builder
|
||||
$this->query->bind($key, $val, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR);
|
||||
$result[$item] = ':' . $key;
|
||||
}
|
||||
} elseif (is_object($val) && method_exists($val, '__toString')) {
|
||||
// 对象数据写入
|
||||
$result[$item] = $val->__toString();
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user