[2] ErrorException in helper.php line 619

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

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

Call Stack

  1. in helper.php line 619
  2. at Error::appError(2, 'current() expects pa...', '/www/wwwroot/www.ven...', 619, ['resultSet' => null])
  3. at current(null) in helper.php line 619
  4. at collection(null) in Product.php line 98
  5. at Product->detail()
  6. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  7. at App::invokeMethod([object(Product), 'detail'], []) in App.php line 597
  8. at App::module(['index', 'Product', 'detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => 'index/Product/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/www.ven...') in index.php line 23

Environment Variables

GET Data
empty
POST Data
empty
Files
empty

Cookies

lang
en
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.venusgracehair.com
PATH_INFO
/product/detail/name/Weft%20Hair%20Extensions
REDIRECT_STATUS
200
SERVER_NAME
www.venusgracehair.com
SERVER_PORT
443
SERVER_ADDR
172.27.206.53
REMOTE_PORT
57144
REMOTE_ADDR
54.167.52.238
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/www.venusgracehair.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/product/detail/name/Weft%2520Hair%2520Extensions
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/product/detail/name/Weft%2520Hair%2520Extensions
SCRIPT_FILENAME
/www/wwwroot/www.venusgracehair.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711627398.9041
REQUEST_TIME
1711627398
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.venusgracehair.com/public/../application/
THINK_VERSION
5.0.15
THINK_START_TIME
1711627398.9045
THINK_START_MEM
404192
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.venusgracehair.com/thinkphp/
LIB_PATH
/www/wwwroot/www.venusgracehair.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.venusgracehair.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.venusgracehair.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.venusgracehair.com/
EXTEND_PATH
/www/wwwroot/www.venusgracehair.com/extend/
VENDOR_PATH
/www/wwwroot/www.venusgracehair.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.venusgracehair.com/runtime/
LOG_PATH
/www/wwwroot/www.venusgracehair.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.venusgracehair.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.venusgracehair.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.venusgracehair.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/www/wwwroot/www.venusgracehair.com/addons/