[0] ThrowableError in Product.php line 146

致命错误: Call to a member function toArray() on null

  1. {
  2. if ($id = input('urlname')) {
  3. if(is_numeric($id)){
  4. $where['id'] = $id;
  5. }else{
  6. $where['urlname'] = $id;
  7. }
  8. }
  9. //$where['lang'] = cookie('lang');
  10. $productDetail = $this->model->where($where)->find()->toArray();
  11. $productDetail['remark_add']=json_decode($productDetail['remark_add'],true);
  12. $productDetail['images'] = explode(',', $productDetail['images']);
  13. $productDetail['proimage_alt'] = explode(',',$productDetail['proimage_alt']);
  14. $productDetail['thisimages'] = array();
  15. foreach ($productDetail['images'] as $key =>$value){
  16. $productDetail['load'][$key]['images']=$productDetail['images'][$key];
  17. // $productDetail['load'][$key]['proimage_alt']=$productDetail['proimage_alt'][$key];
  18. }

Call Stack

  1. in Product.php line 146
  2. at Product->detail()
  3. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  4. at App::invokeMethod([object(Product), 'detail'], []) in App.php line 598
  5. at App::module(['index', 'product', 'detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  6. at App::exec(['type' => 'module', 'module' => ['index', 'product', 'detail'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  7. at App::run() in start.php line 19
  8. at require('/www/wwwroot/ankerui...') in index.php line 17

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.jsacrel.com
PATH_INFO
/ProDetail/AMC-Series-Data-Center-Monitor-Module-AMC16Z-ZA
REDIRECT_STATUS
200
SERVER_NAME
www.jsacrel.com
SERVER_PORT
443
SERVER_ADDR
172.21.93.50
REMOTE_PORT
42748
REMOTE_ADDR
3.235.130.73
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/ankerui/public
DOCUMENT_URI
/index.php
REQUEST_URI
/ProDetail/AMC-Series-Data-Center-Monitor-Module-AMC16Z-ZA
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/ProDetail/AMC-Series-Data-Center-Monitor-Module-AMC16Z-ZA
SCRIPT_FILENAME
/www/wwwroot/ankerui/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711620349.64
REQUEST_TIME
1711620349
Environment Variables
empty

ThinkPHP Constants

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