#0 [0]TypeError in TreeService.php line 130

array_reverse(): Argument #1 ($array) must be of type array, null given

  1. * @param int
  2. *
  3. * @return array
  4. */
  5. public function get_pos($myid, $pid = 0)
  6. {
  7. $this->arrt = null;
  8. $this->recur_n($this->arr, $myid, $pid);
  9. return array_reverse($this->arrt);
  10. }
  11. private function recur_n($arr, $tid, $pid)
  12. {
  13. foreach ($arr as $v) {
  14. if ($v['id'] == $tid) {
  15. $this->arrt[] = $v;
  16. if ($v['pid'] != $pid) {
  17. $this->recur_n($arr, $v['pid'], $pid);

Call Stack

  1. in TreeService.php line 130
  2. at array_reverse() in TreeService.php line 130
  3. at TreeService->get_pos() in Product.php line 46
  4. at Product->index()
  5. at ReflectionMethod->invokeArgs() in Container.php line 344
  6. at Container->invokeReflectMethod() in Controller.php line 110
  7. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  8. at Pipeline->think\{closure}() in Browers.php line 57
  9. at Browers->handle()
  10. at call_user_func() in Middleware.php line 142
  11. at Middleware->think\{closure}() in Pipeline.php line 85
  12. at Pipeline->think\{closure}() in Pipeline.php line 66
  13. at Pipeline->then() in Controller.php line 113
  14. at Controller->exec() in Dispatch.php line 90
  15. at Dispatch->run() in Route.php line 772
  16. at Route->think\{closure}() in Pipeline.php line 59
  17. at Pipeline->think\{closure}() in Pipeline.php line 66
  18. at Pipeline->then() in Route.php line 773
  19. at Route->dispatch() in Http.php line 216
  20. at Http->dispatchToRoute() in Http.php line 206
  21. at Http->think\{closure}() in Pipeline.php line 59
  22. at Pipeline->think\{closure}() in MultiApp.php line 71
  23. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  24. at Pipeline->think\{closure}() in Pipeline.php line 66
  25. at Pipeline->then() in MultiApp.php line 72
  26. at MultiApp->handle()
  27. at call_user_func() in Middleware.php line 142
  28. at Middleware->think\{closure}() in Pipeline.php line 85
  29. at Pipeline->think\{closure}() in SessionInit.php line 67
  30. at SessionInit->handle()
  31. at call_user_func() in Middleware.php line 142
  32. at Middleware->think\{closure}() in Pipeline.php line 85
  33. at Pipeline->think\{closure}() in TraceDebug.php line 71
  34. at TraceDebug->handle()
  35. at call_user_func() in Middleware.php line 142
  36. at Middleware->think\{closure}() in Pipeline.php line 85
  37. at Pipeline->think\{closure}() in Pipeline.php line 66
  38. at Pipeline->then() in Http.php line 207
  39. at Http->runWithRequest() in Http.php line 170
  40. at Http->run() in index.php line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
SCRIPT_NAME /index.php
REQUEST_URI /product/163.html
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /product/163.html
REMOTE_PORT 37608
SCRIPT_FILENAME /www/wwwroot/rainfe.chichenit.cn/public/index.php
SERVER_ADMIN webmaster@example.com
CONTEXT_DOCUMENT_ROOT /www/wwwroot/rainfe.chichenit.cn/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /www/wwwroot/rainfe.chichenit.cn/public
REMOTE_ADDR 34.237.245.80
SERVER_PORT 80
SERVER_ADDR 172.17.214.243
SERVER_NAME www.rainfe.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE <address>Apache Server at www.rainfe.com Port 80</address>
LD_LIBRARY_PATH /www/server/apache/lib
PATH /www/server/panel/pyenv/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
HTTP_HOST www.rainfe.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
proxy-nokeepalive 1
REDIRECT_STATUS 200
REDIRECT_PATH_INFO product/163.html
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710831352.1604
REQUEST_TIME 1710831352