diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 73223d2a..5ddd89c0 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2031,7 +2031,7 @@ class Query public function chunk($count, $callback, $column = null) { $options = $this->getOptions(); - $column = $column ?: ($options['pk'] ?: $this->getPk()); + $column = $column ?: $this->getPk(); $bind = $this->bind; $resultSet = $this->limit($count)->order($column, 'asc')->select();