[0] ThrowableError in User.php line 179

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

  1. }
  2. public function certification()
  3. {
  4. return $this->belongsTo('Certification', 'user_id', 'user_id', [], 'LEFT');
  5. }
  6. public function combine()
  7. {
  8. $userinfo = $this->basic->toArray();
  9. $userinfo['prevtime'] = date('Y-m-d H:i:s',$userinfo['prevtime']);
  10. $userinfo['logintime'] = date('Y-m-d H:i:s',$userinfo['logintime']);
  11. $userinfo['createtime'] = date('Y-m-d H:i:s',$userinfo['createtime']);
  12. $this->data = array_merge($this->data, $userinfo);
  13. return $this->data;
  14. }
  15. }

Call Stack

  1. in User.php line 179
  2. at User->combine() in Question.php line 91
  3. at Question->show()
  4. at call_user_func_array([object(Question), 'show'], []) in Route.php line 82
  5. at Route->execute('ask', 'question', 'show')
  6. at ReflectionMethod->invokeArgs(object(Route), ['ask', 'question', 'show']) in App.php line 343
  7. at App::invokeMethod(['\think\addons\Route', 'execute'], ['id' => '7599', 'addon' => 'ask', 'controller' => 'question', ...]) in App.php line 470
  8. at App::exec(['type' => 'method', 'method' => ['\think\addons\Route', 'execute'], 'var' => ['addon' => 'ask', 'controller' => 'question', 'action' => 'show', ...]], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  9. at App::run() in start.php line 19
  10. at require('/welldata/www/www.la...') in index.php line 23

Environment Variables

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

Server/Request Data

USER
www
HOME
/welldata/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
ask.latexstudio.net
PATH_INFO
/ask/question/7599.html
REDIRECT_STATUS
200
SERVER_NAME
www.latexstudio.net
SERVER_PORT
443
SERVER_ADDR
172.16.234.145
REMOTE_PORT
58856
REMOTE_ADDR
54.84.65.73
SERVER_SOFTWARE
nginx/1.14.2
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/welldata/www/www.latexstudio.net/public
DOCUMENT_URI
/index.php
REQUEST_URI
/ask/question/7599.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/ask/question/7599.html
SCRIPT_FILENAME
/welldata/www/www.latexstudio.net/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710840135.3266
REQUEST_TIME
1710840135
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/welldata/www/www.latexstudio.net/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1710840135.3271
THINK_START_MEM
404584
EXT
.php
DS
/
THINK_PATH
/welldata/www/www.latexstudio.net/thinkphp/
LIB_PATH
/welldata/www/www.latexstudio.net/thinkphp/library/
CORE_PATH
/welldata/www/www.latexstudio.net/thinkphp/library/think/
TRAIT_PATH
/welldata/www/www.latexstudio.net/thinkphp/library/traits/
ROOT_PATH
/welldata/www/www.latexstudio.net/
EXTEND_PATH
/welldata/www/www.latexstudio.net/extend/
VENDOR_PATH
/welldata/www/www.latexstudio.net/vendor/
RUNTIME_PATH
/welldata/www/www.latexstudio.net/runtime/
LOG_PATH
/welldata/www/www.latexstudio.net/runtime/log/
CACHE_PATH
/welldata/www/www.latexstudio.net/runtime/cache/
TEMP_PATH
/welldata/www/www.latexstudio.net/runtime/temp/
CONF_PATH
/welldata/www/www.latexstudio.net/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
HTMLPURIFIER_PREFIX
/welldata/www/www.latexstudio.net/vendor/ezyang/htmlpurifier/library
ADDON_PATH
/welldata/www/www.latexstudio.net/addons/
XS_APP_ROOT
/welldata/www/www.latexstudio.net/addons/xunsearch/data