[0] ThrowableError in PageController.php line 204

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

  1. $tplName = empty($more['template']) ? 'page' : $more['template'];
  2. return $this->fetch("/$tplName");
  3. }
  4. //寻找上级
  5. public function cate_path($cat_id){
  6. $portalCategoryModel = new PortalCategoryModel();
  7. //当前分类
  8. $category = $portalCategoryModel->where(array('is_show' => 1, 'delete_time' => 0, 'id' =>$cat_id))->find()->toArray();
  9. $path=$cat_id;
  10. //寻找上级
  11. while($category['parent_id']<>0){
  12. $cate=$portalCategoryModel->where(array('is_show' => 1, 'delete_time' => 0, 'id' =>$category['parent_id']))->find()->toArray();
  13. $path=$cate['id'].'-'.$path;
  14. $category['parent_id']=$cate['parent_id'];
  15. // pre($category['parent_id']);
  16. }
  17. // $path='0-'.$path;

Call Stack

  1. in PageController.php line 204
  2. at PageController->cate_path(null) in PageController.php line 69
  3. at PageController->index()
  4. at ReflectionMethod->invokeArgs(object(PageController), []) in App.php line 343
  5. at App::invokeMethod([object(PageController), 'index'], []) in App.php line 621
  6. at App::module(['portal', 'Page', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['portal', 'Page', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in index.php line 58

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

lang_template
pc_cn

Server/Request Data

USER
www
HOME
/home/www
SCRIPT_NAME
/index.php
REQUEST_URI
/tags/725
QUERY_STRING
s=tags/725
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
s=tags/725
REDIRECT_URL
/tags/725
REMOTE_PORT
43888
SCRIPT_FILENAME
/www/wwwroot/www.hyxt.com/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/www.hyxt.com
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/www/wwwroot/www.hyxt.com
REMOTE_ADDR
101.91.24.25
SERVER_PORT
80
SERVER_ADDR
10.0.0.111
SERVER_NAME
www.hyxt.com
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at www.hyxt.com Port 80</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_X_DAA_TUNNEL
hop_count=2
HTTP_X_FORWARDED_PROTO
http
HTTP_X_LEGO_VIA
200488
HTTP_X_FORWARDED_FOR
160.121.15.38
HTTP_X_TENCENT_UA
Qcloud
HTTP_61A4A06FE8F4150C8CC0F955DFB5C90D
tag
HTTP_X_NWS_LOG_UUID
15115019078923159938
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_ACCEPT_ENCODING
gzip
HTTP_HOST
www.hyxt.com
proxy-nokeepalive
1
SCRIPT_URI
http://www.hyxt.com/tags/725
SCRIPT_URL
/tags/725
REDIRECT_STATUS
200
REDIRECT_SCRIPT_URI
http://www.hyxt.com/tags/725
REDIRECT_SCRIPT_URL
/tags/725
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1642390722.8578
REQUEST_TIME
1642390722
PATH_INFO
tags/725
Environment Variables
empty

ThinkPHP Constants

APP_DEBUG
true
CMF_ROOT
/www/wwwroot/www.hyxt.com/
APP_PATH
/www/wwwroot/www.hyxt.com/app/
UPLOAD_PATH
/www/wwwroot/www.hyxt.com/upload/
CMF_PATH
/www/wwwroot/www.hyxt.com/simplewind/cmf/
PLUGINS_PATH
/www/wwwroot/www.hyxt.com/plugins/
EXTEND_PATH
/www/wwwroot/www.hyxt.com/simplewind/extend/
VENDOR_PATH
/www/wwwroot/www.hyxt.com/simplewind/vendor/
RUNTIME_PATH
/www/wwwroot/www.hyxt.com/data/runtime/
THINKCMF_VERSION
5.0.170927
SO
is_top DESC,list_order DESC,published_time DESC,post_id DESC
GSO
is_top DESC,category_relate.list_order DESC,published_time DESC,goods_id DESC
TMPLSO
order:is_top DESC,list_order DESC,published_time DESC,post_id DESC;
TMPLGSO
order:is_top DESC,category_relate.list_order DESC,published_time DESC,goods_id DESC;
WEB_ROOT
/www/wwwroot/www.hyxt.com/
THINK_VERSION
5.0.24
THINK_START_TIME
1642390722.8582
THINK_START_MEM
408136
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.hyxt.com/simplewind/thinkphp/
LIB_PATH
/www/wwwroot/www.hyxt.com/simplewind/thinkphp/library/
CORE_PATH
/www/wwwroot/www.hyxt.com/simplewind/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.hyxt.com/simplewind/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.hyxt.com/
LOG_PATH
/www/wwwroot/www.hyxt.com/data/runtime/log/
CACHE_PATH
/www/wwwroot/www.hyxt.com/data/runtime/cache/
TEMP_PATH
/www/wwwroot/www.hyxt.com/data/runtime/temp/
CONF_PATH
/www/wwwroot/www.hyxt.com/app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/www/wwwroot/www.hyxt.com/simplewind/vendor/ezyang/htmlpurifier/library
QINIU_FUNCTIONS_VERSION
7.2.1
IS_WECHAT_FALSE
1
IS_WECHAT_TRUE
2