[8] ErrorException in Builder.php line 295

未定义数组下标: 1

  1. protected function parseWhereItem($field, $val, $rule = '', $options = [], $binds = [], $bindName = null)
  2. {
  3. // 字段分析
  4. $key = $field ? $this->parseKey($field, $options) : '';
  5. // 查询规则和条件
  6. if (!is_array($val)) {
  7. $val = ['=', $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);

Call Stack

  1. in Builder.php line 295
  2. at Error::appError(8, 'Undefined offset: 1', '/www/wwwroot/xdc_web...', 295, ['field' => 'c.typeArea', 'val' => [['egt', '300']], 'rule' => 'AND', ...]) in Builder.php line 295
  3. at Builder->parseWhereItem('c.typeArea', [['egt', '300']], 'AND', ['alias' => ['newhouse_project' => 'a', 'newhouse_project_part' => 'b', 'newhouse_roomplan' => 'c'], 'join' => [[['newhouse_project_part' => 'b'], 'LEFT', 'a.id=b.pid'], [['newhouse_roomplan' => 'c'], 'LEFT', 'a.id=c.pId']], 'multi' => ['AND' => ['a.cityId' => ['341100'], 'a.areaId' => ['70'], 'c.typeArea' => [[['egt', '300']]], ...]], ...], ['id' => 1, 'projectName' => 2, 'logo' => 2, ...]) in Builder.php line 276
  4. at Builder->buildWhere(['AND' => ['a.cityId' => '341100', 'a.areaId' => '70', 'c.typeArea' => [['egt', '300']], ...]], ['alias' => ['newhouse_project' => 'a', 'newhouse_project_part' => 'b', 'newhouse_roomplan' => 'c'], 'join' => [[['newhouse_project_part' => 'b'], 'LEFT', 'a.id=b.pid'], [['newhouse_roomplan' => 'c'], 'LEFT', 'a.id=c.pId']], 'multi' => ['AND' => ['a.cityId' => ['341100'], 'a.areaId' => ['70'], 'c.typeArea' => [[['egt', '300']]], ...]], ...]) in Builder.php line 223
  5. at Builder->parseWhere(['AND' => ['a.cityId' => '341100', 'a.areaId' => '70', 'c.typeArea' => [['egt', '300']], ...]], ['alias' => ['newhouse_project' => 'a', 'newhouse_project_part' => 'b', 'newhouse_roomplan' => 'c'], 'join' => [[['newhouse_project_part' => 'b'], 'LEFT', 'a.id=b.pid'], [['newhouse_roomplan' => 'c'], 'LEFT', 'a.id=c.pId']], 'multi' => ['AND' => ['a.cityId' => ['341100'], 'a.areaId' => ['70'], 'c.typeArea' => [[['egt', '300']]], ...]], ...]) in Builder.php line 658
  6. at Builder->select(['alias' => ['newhouse_project' => 'a', 'newhouse_project_part' => 'b', 'newhouse_roomplan' => 'c'], 'join' => [[['newhouse_project_part' => 'b'], 'LEFT', 'a.id=b.pid'], [['newhouse_roomplan' => 'c'], 'LEFT', 'a.id=c.pId']], 'multi' => ['AND' => ['a.cityId' => ['341100'], 'a.areaId' => ['70'], 'c.typeArea' => [[['egt', '300']]], ...]], ...]) in Query.php line 2285
  7. at Query->select(false) in Query.php line 2607
  8. at Query->buildSql() in Query.php line 510
  9. at Query->count() in Query.php line 1322
  10. at Query->paginate(8, false, ['type' => '\app\common\controll...', 'var_page' => 'page', 'list_rows' => 10, ...]) in House.php line 52
  11. at House->getHouseLists('', 1, 8, ['a.cityId' => '341100', 'a.areaId' => '70', 'c.typeArea' => [['egt', '300']], ...], 'xdc_house_341100_hou...') in House.php line 161
  12. at House->lists()
  13. at ReflectionMethod->invokeArgs(object(House), []) in App.php line 230
  14. at App::invokeMethod([object(House), 'lists']) in App.php line 393
  15. at App::module(['newhouse', 'house', 'lists'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 138
  16. at App::run() in start.php line 18
  17. at require('/www/wwwroot/xdc_web...') in index.php line 18

Exception Datas

Error Context
field c.typeArea
val [ [ "egt", "300" ] ]
rule AND
options { "alias": { "newhouse_project": "a", "newhouse_project_part": "b", "newhouse_roomplan": "c" }, "join": [ [ { "newhouse_project_part": "b" }, "LEFT", "a.id=b.pid" ], [ { "newhouse_roomplan": "c" }, "LEFT", "a.id=c.pId" ] ], "multi": { "AND": { "a.cityId": [ "341100" ], "a.areaId": [ "70" ], "c.typeArea": [ [ [ "egt", "300" ] ] ], "a.status": [ 1 ] } }, "where": { "AND": { "a.cityId": "341100", "a.areaId": "70", "c.typeArea": [ [ "egt", "300" ] ], "a.status": 1 } }, "group": "a.id", "field": [ "count(*)" ], "table": "newhouse_project", "data": [], "strict": true, "master": false, "lock": false, "fetch_pdo": false, "fetch_sql": true, "distinct": false, "union": "", "having": "", "limit": "", "order": "", "force": "", "comment": "" }
binds { "id": 1, "projectName": 2, "logo": 2, "thumb": 2, "cityId": 1, "terminal": 1, "spelling": 2, "areaId": 1, "zoneId": 1, "propertyType": 1, "buildType": 2, "saleState": 1, "longitude": 1, "latitude": 1, "specialOffers": 2, "offerDate": 2, "projectAddr": 2, "salePhone": 2, "freePhone": 2, "openInfo": 2, "houseAttribute": 1, "renovateState": 2, "juniorSchool": 2, "middleSchool": 2, "isSynthesis": 1, "createTime": 1, "updateTime": 1, "listOrder": 1, "status": 1, "posIds": 1, "hits": 1, "seoTitle": 2, "seoKeywords": 2, "seoDescription": 2, "realtyConsultant": 2, "wechat_bgimage": 2, "is_zfh": 1, "start_date": 2, "end_date": 2, "zfh_house_id": 1 }
bindName Resource
key `c`.`typeArea`
exp [ "egt", "300" ]

Environment Variables

GET Data

siteId
341100
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
house.chz.newhouse.com.cn
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/list/a70m8/
REDIRECT_STATUS
200
SERVER_NAME
newhouse.com.cn
SERVER_PORT
80
SERVER_ADDR
172.19.31.161
REMOTE_PORT
49908
REMOTE_ADDR
3.230.128.106
SERVER_SOFTWARE
nginx/1.20.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/xdc_web/public
DOCUMENT_URI
/index.php
REQUEST_URI
/list/a70m8/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/list/a70m8/
SCRIPT_FILENAME
/www/wwwroot/xdc_web/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710831683.9293
REQUEST_TIME
1710831683
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/xdc_web/public/../application/
PUBLIC_PATH
/www/wwwroot/xdc_web/public/../public/
UPLOAD_PATH
/www/wwwroot/xdc_web/public/../public/uploads
THINK_VERSION
5.0.7
THINK_START_TIME
1710831683.9296
THINK_START_MEM
379552
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/xdc_web/thinkphp/
LIB_PATH
/www/wwwroot/xdc_web/thinkphp/library/
CORE_PATH
/www/wwwroot/xdc_web/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/xdc_web/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/xdc_web/
EXTEND_PATH
/www/wwwroot/xdc_web/extend/
VENDOR_PATH
/www/wwwroot/xdc_web/vendor/
RUNTIME_PATH
/www/wwwroot/xdc_web/runtime/
LOG_PATH
/www/wwwroot/xdc_web/runtime/log/
CACHE_PATH
/www/wwwroot/xdc_web/runtime/cache/
TEMP_PATH
/www/wwwroot/xdc_web/runtime/temp/
CONF_PATH
/www/wwwroot/xdc_web/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false