Model类_parseType方法增加对参数绑定的判断

This commit is contained in:
ThinkPHP
2013-04-26 21:07:02 +08:00
parent a6a7f8b655
commit e77e7327d4

View File

@@ -431,7 +431,7 @@ class Model {
* @return void
*/
protected function _parseType(&$data,$key) {
if(isset($this->fields['_type'][$key])) {
if(empty($this->options['bind'][':'.$key]) && isset($this->fields['_type'][$key])) {
$fieldType = strtolower($this->fields['_type'][$key]);
if(false === strpos($fieldType,'bigint') && false !== strpos($fieldType,'int')) {
$data[$key] = intval($data[$key]);