[8] ErrorException in Builder.php line 323

未定义数组下标: 0

  1. protected function parseWhereItem($field, $val, $rule = '', $options = [], $binds = [], $bindName = null)
  2. {
  3. // 字段分析
  4. $key = $field ? $this->parseKey($field, $options, true) : '';
  5. // 查询规则和条件
  6. if (!is_array($val)) {
  7. $val = is_null($val) ? ['null', ''] : ['=', $val];
  8. }
  9. list($exp, $value) = $val;
  10. // 对一个字段使用多个查询条件
  11. if (is_array($exp)) {
  12. $item = array_pop($val);
  13. // 传入 or 或者 and
  14. if (is_string($item) && in_array($item, ['AND', 'and', 'OR', 'or'])) {
  15. $rule = $item;
  16. } else {
  17. array_push($val, $item);