#0 [2]ErrorException in TreeService.php line 111

array_reverse() expects parameter 1 to be array, null given

  1. /**
  2. * 得到当前位置数组
  3. * @param int
  4. * @return array
  5. */
  6. public function get_pos($myid, $pid=0){
  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. foreach ($arr as $v) {
  13. if ($v['id'] == $tid) {
  14. $this->arrt[] = $v;
  15. if ($v['pid'] != $pid) $this->recur_n($arr, $v['pid'], $pid);
  16. }
  17. }

Call Stack

  1. in TreeService.php line 111
  2. at Error->appError()
  3. at array_reverse() in TreeService.php line 111
  4. at TreeService->get_pos() in News.php line 112
  5. at News->index()
  6. at ReflectionMethod->invokeArgs() in Container.php line 342
  7. at Container->invokeReflectMethod() in Controller.php line 110
  8. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  9. at Pipeline->think\{closure}() in Browers.php line 55
  10. at Browers->handle()
  11. at call_user_func() in Middleware.php line 142
  12. at Middleware->think\{closure}() in Pipeline.php line 84
  13. at Pipeline->think\{closure}() in Pipeline.php line 65
  14. at Pipeline->then() in Controller.php line 113
  15. at Controller->exec() in Dispatch.php line 89
  16. at Dispatch->run() in Route.php line 760
  17. at Route->think\{closure}() in Pipeline.php line 59
  18. at Pipeline->think\{closure}() in Pipeline.php line 65
  19. at Pipeline->then() in Route.php line 761
  20. at Route->dispatch() in Http.php line 210
  21. at Http->dispatchToRoute() in Http.php line 200
  22. at Http->think\{closure}() in Pipeline.php line 59
  23. at Pipeline->think\{closure}() in MultiApp.php line 71
  24. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  25. at Pipeline->think\{closure}() in Pipeline.php line 65
  26. at Pipeline->then() in MultiApp.php line 72
  27. at MultiApp->handle()
  28. at call_user_func() in Middleware.php line 142
  29. at Middleware->think\{closure}() in Pipeline.php line 84
  30. at Pipeline->think\{closure}() in SessionInit.php line 67
  31. at SessionInit->handle()
  32. at call_user_func() in Middleware.php line 142
  33. at Middleware->think\{closure}() in Pipeline.php line 84
  34. at Pipeline->think\{closure}() in TraceDebug.php line 71
  35. at TraceDebug->handle()
  36. at call_user_func() in Middleware.php line 142
  37. at Middleware->think\{closure}() in Pipeline.php line 84
  38. at Pipeline->think\{closure}() in Pipeline.php line 65
  39. at Pipeline->then() in Http.php line 201
  40. at Http->runWithRequest() in Http.php line 162
  41. 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
HTTP_HOST xiangxiangli.com.cn
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME xiangxiangli.com.cn
SERVER_PORT 80
SERVER_ADDR 172.28.35.203
REMOTE_PORT 49976
REMOTE_ADDR 3.237.51.235
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/xiangxiangli.com.cn/public
DOCUMENT_URI /index.php
REQUEST_URI /news/66.html
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=//news/66.html
SCRIPT_FILENAME /www/wwwroot/xiangxiangli.com.cn/public/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711616659.0142
REQUEST_TIME 1711616659