[0] ThrowableError in Category.php line 157

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

  1. 'paginate' => $pageList->render(),
  2. 'mapInfo' => $this->getSetting() ,
  3. 'webTitle' => "关于我们-湖南联合智为科技有限公司" ,
  4. 'webKeywords' => "关于我们,湖南联合智为科技有限公司" ,
  5. 'webDecs' => "关于我们,湖南联合智为科技有限公司" ,
  6. ] );
  7. return $category[ 'index_template' ];
  8. } elseif ( $category['pid'] == 16 || $category[ 'id' ] == 16 ){
  9. $id = $this->request->param( 'id' , '' );
  10. $category = CategoryModule::get( $id )->toArray();
  11. $table = $category[ 'type' ] == 'lists' ? 'cate_list' : 'cate';
  12. $list = Db::name( $table )->where( [ 'is_deleted' => 1 , 'status' => 1 , 'pid' => $id ] )->order( 'sort asc,id asc' )->select();
  13. foreach ( $list as $k => $v ) {
  14. $list[ $k ][ 'content' ] = json_decode( $v[ 'content' ] , true );
  15. }
  16. $this->assign( [
  17. 'list' => $list ,
  18. 'tid' => $category[ 'pid' ] ,
  19. 'webTitle' => "关于我们-湖南联合智为科技有限公司" ,

Call Stack

  1. in Category.php line 157
  2. at Category->index_filter(['id' => 16, 'name' => '技术支持', 'logo' => '', ...]) in Category.php line 41
  3. at Category->index()
  4. at ReflectionMethod->invokeArgs(object(Category), []) in Container.php line 355
  5. at Container->invokeReflectMethod(object(Category), object(ReflectionMethod), ['pid' => '16']) in Module.php line 127
  6. at Module->exec() in Dispatch.php line 165
  7. at Dispatch->run() in App.php line 433
  8. at App->think\{closure}(object(Request), object(Closure), null)
  9. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 142
  10. at Middleware->think\{closure}(object(Request)) in Check.php line 13
  11. at Check->handle(object(Request), object(Closure), null)
  12. at call_user_func_array([object(Check), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 142
  13. at Middleware->think\{closure}(object(Request)) in Auth.php line 38
  14. at Auth->handle(object(Request), object(Closure), null)
  15. at call_user_func_array([object(Auth), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 142
  16. at Middleware->think\{closure}(object(Request))
  17. at call_user_func(object(Closure), object(Request)) in Middleware.php line 94
  18. at Middleware->dispatch(object(Request)) in App.php line 456
  19. at App->run() in index.php line 11

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER
nobody
HOME
/
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.hnlhzw.cn
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
REDIRECT_STATUS
200
SERVER_NAME
hnlhzw.cn
SERVER_PORT
80
SERVER_ADDR
172.16.29.134
REMOTE_PORT
20001
REMOTE_ADDR
154.220.30.4
SERVER_SOFTWARE
nginx/1.16.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/data/webzhangzhang
DOCUMENT_URI
/index.php
REQUEST_URI
/item/16.html
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=item/16.html
SCRIPT_FILENAME
/data/webzhangzhang/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1635325013.372
REQUEST_TIME
1635325013
Environment Variablesempty
ThinkPHP Constants
QINIU_FUNCTIONS_VERSION
7.2.5