#0 [0]TypeError in View.php line 87

Argument 1 passed to think\View::fetch() must be of the type string, null given

  1. /**
  2. * 解析和获取模板内容 用于输出
  3. * @access public
  4. * @param string $template 模板文件名或者内容
  5. * @param array $vars 模板变量
  6. * @return string
  7. * @throws \Exception
  8. */
  9. public function fetch(string $template = '', array $vars = []): string
  10. {
  11. return $this->getContent(function () use ($vars, $template) {
  12. $this->engine()->fetch($template, array_merge($this->data, $vars));
  13. });
  14. }
  15. /**
  16. * 渲染内容输出
  17. * @access public

Call Stack

  1. in View.php line 87
  2. at View->fetch(null)
  3. at call_user_func_array([object(View), 'fetch'], [null]) in Facade.php line 96
  4. at Facade::__callStatic('fetch', [null]) in Navigation.php line 57
  5. at Navigation->index('product')
  6. at ReflectionMethod->invokeArgs(object(Navigation), ['product']) in Container.php line 343
  7. at Container->invokeReflectMethod(object(Navigation), object(ReflectionMethod), ['category' => '28012', 'id' => 'product']) in Controller.php line 110
  8. at Controller->think\route\dispatch\{closure}(object(Request)) in Pipeline.php line 59
  9. at Pipeline->think\{closure}(object(Request)) in Auth.php line 42
  10. at Auth->handle(object(Request), object(Closure))
  11. at call_user_func([object(Auth), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  12. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  13. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  14. at Pipeline->then(object(Closure)) in Controller.php line 113
  15. at Controller->exec() in Dispatch.php line 89
  16. at Dispatch->run() in Route.php line 772
  17. at Route->think\{closure}(object(Request)) in Pipeline.php line 59
  18. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  19. at Pipeline->then(object(Closure)) in Route.php line 773
  20. at Route->dispatch(object(Request), object(Closure)) in Http.php line 216
  21. at Http->dispatchToRoute(object(Request)) in Http.php line 206
  22. at Http->think\{closure}(object(Request)) in Pipeline.php line 59
  23. at Pipeline->think\{closure}(object(Request)) in MultiApp.php line 71
  24. at MultiApp->think\app\{closure}(object(Request)) in Pipeline.php line 59
  25. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  26. at Pipeline->then(object(Closure)) in MultiApp.php line 72
  27. at MultiApp->handle(object(Request), object(Closure))
  28. at call_user_func([object(MultiApp), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  29. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  30. at Pipeline->think\{closure}(object(Request)) in AllowCrossDomain.php line 61
  31. at AllowCrossDomain->handle(object(Request), object(Closure))
  32. at call_user_func([object(AllowCrossDomain), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  33. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  34. at Pipeline->think\{closure}(object(Request)) in TraceDebug.php line 71
  35. at TraceDebug->handle(object(Request), object(Closure))
  36. at call_user_func([object(TraceDebug), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  37. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  38. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  39. at Pipeline->then(object(Closure)) in Http.php line 207
  40. at Http->runWithRequest(object(Request)) in Http.php line 170
  41. at Http->run() in index.php line 20

Environment Variables

GET Data
category 28012
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
DOCUMENT_ROOT /usr/home/wh-aq5bdhyyjjdbke5gjck/htdocs
GATEWAY_INTERFACE CGI/1.1
HTTPS on
HTTP_ACCEPT */*
HTTP_HOST gaozai.cn
HTTP_USER_AGENT claudebot
PATH /bin
PHPRC /var/www/php72/hichina_ini/wh-aq5bdhyyjjdbke5gjck
QUERY_STRING category=28012
REDIRECT_DOCUMENT_ROOT /usr/home/wh-aq5bdhyyjjdbke5gjck/htdocs
REDIRECT_GATEWAY_INTERFACE CGI/1.1
REDIRECT_HTTPS on
REDIRECT_HTTP_ACCEPT */*
REDIRECT_HTTP_HOST gaozai.cn
REDIRECT_HTTP_USER_AGENT claudebot
REDIRECT_PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO /navigation/product.html
REDIRECT_PATH_TRANSLATED redirect:/index.php/navigation/product.html/product.html
REDIRECT_QUERY_STRING category=28012
REDIRECT_REMOTE_ADDR 54.226.222.183
REDIRECT_REMOTE_PORT 39528
REDIRECT_REQUEST_METHOD GET
REDIRECT_REQUEST_URI /index/navigation/product.html?category=28012
REDIRECT_SCRIPT_FILENAME /usr/home/wh-aq5bdhyyjjdbke5gjck/htdocs/index
REDIRECT_SCRIPT_NAME /index
REDIRECT_SERVER_ADDR 10.19.97.245
REDIRECT_SERVER_ADMIN webmaster@wh-aq5bdhyyjjdbke5gjck.my3w.com
REDIRECT_SERVER_NAME gaozai.cn
REDIRECT_SERVER_PORT 443
REDIRECT_SERVER_PROTOCOL HTTP/1.1
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE Apache
REDIRECT_SSL_TLS_SNI gaozai.cn
REDIRECT_STATUS 200
REDIRECT_TZ Asia/Shanghai
REDIRECT_UNIQUE_ID ZfkNfQoTYfUAAcFsDCcAAAAC
REDIRECT_URL /index/navigation/product.html
REMOTE_ADDR 54.226.222.183
REMOTE_PORT 39528
REQUEST_METHOD GET
REQUEST_URI /index/navigation/product.html?category=28012
SCRIPT_FILENAME /usr/home/wh-aq5bdhyyjjdbke5gjck/htdocs/index.php
SCRIPT_NAME /index.php
SERVER_ADDR 10.19.97.245
SERVER_ADMIN webmaster@wh-aq5bdhyyjjdbke5gjck.my3w.com
SERVER_NAME gaozai.cn
SERVER_PORT 443
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SSL_TLS_SNI gaozai.cn
TZ Asia/Shanghai
UNIQUE_ID ZfkNfQoTYfUAAcFsDCcAAAAC
ORIG_PATH_INFO /index/navigation/product.html
ORIG_PATH_TRANSLATED /usr/home/wh-aq5bdhyyjjdbke5gjck/htdocs/index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710820733.597
REQUEST_TIME 1710820733
0.138736s