Fatal error: Call to a member function getChildren() on null in /www/wwwroot/eaglotest.com.cn/application/common/services/ProductService.php on line 452

[1] ErrorException in ProductService.php line 452

Call to a member function getChildren() on null

  1. * @return Product
  2. * @throws DbException
  3. */
  4. private function getCenterTableAoQuery(SearchFo $fo) {
  5. $query = new Product();
  6. $query->whereLang(LangService::getIns()->getLang());
  7. $query->where(["f_product.is_show" => 1]);
  8. if (!empty($fo->cateId)) {
  9. $cate = ProductCate::getById($fo->cateId);
  10. $children =$cate->getChildren();
  11. $ids = [$cate->id];
  12. foreach ($children as $child) {
  13. $ids[] = $child->id;
  14. }
  15. $query->where("f_product.cate_id", "in", implode(",", $ids));
  16. }
  17. if (!empty($fo->keyword)) {
  18. $query->whereLike("f_product.product_name|f_product.note", "%" . $fo->keyword . "%");
  19. }

Call Stack

  1. in ProductService.php line 452
  2. at Error::appShutdown()

Environment Variables

GET Data

lang
zh-Hans
cateId
184
POST Data
empty
Files
empty
Cookies
empty

Session

Lang
zh-Hans

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/eaglotest.com.cn/index.php
QUERY_STRING
s=/home/Product/center/cateId/184&lang=zh-Hans
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/home/Product/center/cateId/184?lang=zh-Hans
DOCUMENT_URI
/index.php
DOCUMENT_ROOT
/www/wwwroot/eaglotest.com.cn
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.20.2
REMOTE_ADDR
54.221.159.188
REMOTE_PORT
49720
SERVER_ADDR
172.23.99.9
SERVER_PORT
80
SERVER_NAME
eaglotest.com.cn
REDIRECT_STATUS
200
PATH_INFO
/home/Product/center/cateId/184
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
eaglotest.com.cn
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710846239.3731
REQUEST_TIME
1710846239
Environment Variables
empty

FengHuoPHP Constants

PLUGIN_PATH
/www/wwwroot/eaglotest.com.cn/plugins/
UPLOAD_PATH
public/upload/
FENGHUO_CACHE_TIME
1
SITE_URL
http://eaglotest.com.cn
INSTALL_DATE
1463741583
SERIALNUMBER
20160520065303oCWIoa
APP_PATH
/www/wwwroot/eaglotest.com.cn/application/
NOW_TIME
1710846239
THINK_VERSION
5.0.15
THINK_START_TIME
1710846239.3737
THINK_START_MEM
275824
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/eaglotest.com.cn/thinkphp/
LIB_PATH
/www/wwwroot/eaglotest.com.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/eaglotest.com.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/eaglotest.com.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/eaglotest.com.cn/
EXTEND_PATH
/www/wwwroot/eaglotest.com.cn/extend/
VENDOR_PATH
/www/wwwroot/eaglotest.com.cn/vendor/
RUNTIME_PATH
/www/wwwroot/eaglotest.com.cn/runtime/
LOG_PATH
/www/wwwroot/eaglotest.com.cn/runtime/log/
CACHE_PATH
/www/wwwroot/eaglotest.com.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/eaglotest.com.cn/runtime/temp/
CONF_PATH
/www/wwwroot/eaglotest.com.cn/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
IS_AJAX
false
IS_GET
true
IS_POST
false
MODULE_NAME
home
CONTROLLER_NAME
Product
ACTION_NAME
center
PREFIX
f_