Skip to content

Commit f44bd2a

Browse files
committed
Merge pull request top-think#398 from terranc/patch-1
解决ON DUPLICATE KEY时值不能为NULL的问题
2 parents 60cdc4b + 59a9cb1 commit f44bd2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ThinkPHP/Library/Think/Db/Driver/Mysql.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ protected function parseDuplicate($duplicate)
192192
$val = array('value', $val);
193193
}
194194

195-
if (!isset($val[1])) {
195+
if (!isset($val[1]) && !is_null($val[1])) {
196196
continue;
197197
}
198198

0 commit comments

Comments
 (0)