[2] ErrorException in helper.php line 582

current() expects parameter 1 to be array, null given

  1. if (!function_exists('collection')) {
  2. /**
  3. * 数组转换为数据集对象
  4. * @param array $resultSet 数据集数组
  5. * @return \think\model\Collection|\think\Collection
  6. */
  7. function collection($resultSet)
  8. {
  9. $item = current($resultSet);
  10. if ($item instanceof Model) {
  11. return \think\model\Collection::make($resultSet);
  12. } else {
  13. return \think\Collection::make($resultSet);
  14. }
  15. }
  16. }

Call Stack

  1. in helper.php line 582
  2. at Error::appError(2, 'current() expects pa...', '/www/wwwroot/heming....', 582, ['resultSet' => null])
  3. at current(null) in helper.php line 582
  4. at collection(null) in Index.php line 172
  5. at Index->new_detail()
  6. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  7. at App::invokeMethod([object(Index), 'new_detail'], []) in App.php line 611
  8. at App::module(['index', 'index', 'new_detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'new_detail']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/www/wwwroot/heming....') in index.php line 24

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
heming.kyl.biz
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/index/index/new_detail/id/5576.html
REDIRECT_STATUS
200
SERVER_NAME
heming.kyl.biz
SERVER_PORT
80
SERVER_ADDR
172.16.5.70
REMOTE_PORT
60268
REMOTE_ADDR
3.226.254.255
SERVER_SOFTWARE
nginx/1.15.10
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/heming.kyl.biz/public
DOCUMENT_URI
/index.php
REQUEST_URI
/index/index/new_detail/id/5576.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/index/index/new_detail/id/5576.html
SCRIPT_FILENAME
/www/wwwroot/heming.kyl.biz/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711618045.694
REQUEST_TIME
1711618045
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/heming.kyl.biz/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711618045.6946
THINK_START_MEM
404656
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/heming.kyl.biz/thinkphp/
LIB_PATH
/www/wwwroot/heming.kyl.biz/thinkphp/library/
CORE_PATH
/www/wwwroot/heming.kyl.biz/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/heming.kyl.biz/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/heming.kyl.biz/
EXTEND_PATH
/www/wwwroot/heming.kyl.biz/extend/
VENDOR_PATH
/www/wwwroot/heming.kyl.biz/vendor/
RUNTIME_PATH
/www/wwwroot/heming.kyl.biz/runtime/
LOG_PATH
/www/wwwroot/heming.kyl.biz/runtime/log/
CACHE_PATH
/www/wwwroot/heming.kyl.biz/runtime/cache/
TEMP_PATH
/www/wwwroot/heming.kyl.biz/runtime/temp/
CONF_PATH
/www/wwwroot/heming.kyl.biz/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/www/wwwroot/heming.kyl.biz/addons/