CHINA·必赢bwin(中国)唯一官方网站


Fatal error: Call to a member function toArray() on null in /www/wwwroot/huizhicapital.cn/application/model/Category.php on line 140

[1] ErrorException in Category.php line 140

Call to a member function toArray() on null

  1. $where['islink'] = 0;
  2. $cate=self::with('getmodels')->where($where)->field("id,catename,catepic,banner,description,ename,pid,modelid")->orderRaw('sort ASC,id DESC')->select();
  3. $cate= collection($cate)->toArray();
  4. $arr = Tree($cate,'child',$pid);
  5. return $arr;
  6. }
  7. //根据下级ID 获取所有上级
  8. public static function getTopTreeCate($cid ,$array=[]) {
  9. $is_parent = self::field('id,pid')->where(["id"=>$cid])->find()->toArray();
  10. //将数据存在数组中
  11. $array[] = $is_parent;
  12. //如果有上级id,则继续递归查询栏目
  13. if ($is_parent["pid"]) {
  14. return self::getTopTreeCate($is_parent['pid'],$array);
  15. }
  16. return $array;
  17. }

Call Stack

  1. in Category.php line 140
  2. at Error::appShutdown()

Environment Variables

GET Data
empty
POST Data
empty
Files
empty

Cookies

PHPSESSID
76ra30h174p46oi7aijmb8kon1
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/huizhicapital.cn/public/index.php
QUERY_STRING
s=/lpnews/928.html
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
//lpnews/928.html
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/huizhicapital.cn/public
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
https
HTTPS
on
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.22.1
REMOTE_ADDR
104.140.12.162
REMOTE_PORT
43868
SERVER_ADDR
172.27.12.233
SERVER_PORT
443
SERVER_NAME
huizhicapital.cn
REDIRECT_STATUS
200
PATH_INFO
/lpnews/928.html
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.huizhicapital.cn
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip
HTTP_COOKIE
PHPSESSID=76ra30h174p46oi7aijmb8kon1
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711641409.6838
REQUEST_TIME
1711641409
Environment Variables
empty

ThinkPHP Constants

BIND_MODULE
index
APP_PATH
/www/wwwroot/huizhicapital.cn/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711641409.6844
THINK_START_MEM
261992
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/huizhicapital.cn/thinkphp/
LIB_PATH
/www/wwwroot/huizhicapital.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/huizhicapital.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/huizhicapital.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/huizhicapital.cn/
EXTEND_PATH
/www/wwwroot/huizhicapital.cn/extend/
VENDOR_PATH
/www/wwwroot/huizhicapital.cn/vendor/
RUNTIME_PATH
/www/wwwroot/huizhicapital.cn/runtime/
LOG_PATH
/www/wwwroot/huizhicapital.cn/runtime/log/
CACHE_PATH
/www/wwwroot/huizhicapital.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/huizhicapital.cn/runtime/temp/
CONF_PATH
/www/wwwroot/huizhicapital.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
XML 地图