yabo88官网-亚博网页版登录

[1] ErrorException in Article.php line 85

Call to a member function toArray() on null

  1. $articles['data'][$k]['category_name'] = cache('categorys')[$v['category_id']]['name'];
  2. }
  3. return $articles;
  4. }
  5. /**
  6. * 获取文章详情
  7. */
  8. function get_details($id){
  9. $result = $this->get($id);
  10. $article = $result->toArray();
  11. $next = $this->where('id','<',$id)->where('category_id',$article['category_id'])->order('id desc')->find();
  12. $prev = $this->where('id','>',$id)->where('category_id',$article['category_id'])->order('id asc')->find();
  13. $prev = $prev?$prev->toArray():array('title'=>'返回列表','url'=>url('index/article/lists',['category_id'=>$article['category_id']]));
  14. $next = $next?$next->toArray():array('title'=>'返回列表','url'=>url('index/article/lists',['category_id'=>$article['category_id']]));
  15. $article['prev'] = array('title'=>$prev['title'],'url'=>$prev['url']);
  16. $article['next'] = array('title'=>$next['title'],'url'=>$next['url']);
  17. return $article;
  18. }
  19. }

Call Stack

  1. in Article.php line 85
  2. at Error::appShutdown()

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookies
PHPSESSID iql3d8puj2mbr7iu0hvav3c1j4
Session
think { "member": { "id": 0 } }
Server/Request Data
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Users\Administrator\AppData\Roaming
CLIENTNAME WIN-5G1C74HUCT8
CommonProgramFiles C:\Program Files\Common Files
CommonProgramFiles(x86) C:\Program Files (x86)\Common Files
CommonProgramW6432 C:\Program Files\Common Files
COMPUTERNAME 5IGV4
ComSpec C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK NO
HOMEDRIVE C:
HOMEPATH \Users\Administrator
LOCALAPPDATA C:\Users\Administrator\AppData\Local
LOGONSERVER \\5IGV4
NUMBER_OF_PROCESSORS 2
OS Windows_NT
Path C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE AMD64
PROCESSOR_IDENTIFIER Intel64 Family 6 Model 13 Stepping 3, GenuineIntel
PROCESSOR_LEVEL 6
PROCESSOR_REVISION 0d03
ProgramData C:\ProgramData
ProgramFiles C:\Program Files
ProgramFiles(x86) C:\Program Files (x86)
ProgramW6432 C:\Program Files
PSModulePath C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC C:\Users\Public
SESSIONNAME RDP-Tcp#0
SystemDrive C:
SystemRoot C:\Windows
TEMP C:\Users\ADMINI~1\AppData\Local\Temp\2
TMP C:\Users\ADMINI~1\AppData\Local\Temp\2
USERDOMAIN 5IGV4
USERNAME Administrator
USERPROFILE C:\Users\Administrator
windir C:\Windows
windows_tracing_flags 3
windows_tracing_logfile C:\BVTBin\Tests\installpackage\csilogfile.log
HTTP_CONTENT_TYPE application/x-www-form-urlencoded
HTTP_CONTENT_LENGTH 0
HTTP_ACCEPT_CHARSET utf-8
HTTP_COOKIE PHPSESSID=iql3d8puj2mbr7iu0hvav3c1j4
HTTP_ACCEPT */*
HTTP_HOST www.sdccph.com
HTTP_USER_AGENT Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
REDIRECT_STATUS 200
SERVER_NAME sdccph.com
SERVER_PORT 80
SERVER_ADDR 101.36.177.114
REMOTE_PORT 52028
REMOTE_ADDR 45.192.88.50
SERVER_SOFTWARE nginx/1.15.11
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT C:/WEB/ch
DOCUMENT_URI /index.php
REQUEST_URI /index/article/show/id/197.html
SCRIPT_NAME /index.php
CONTENT_LENGTH 0
CONTENT_TYPE application/x-www-form-urlencoded
REQUEST_METHOD GET
QUERY_STRING s=/index/article/show/id/197.html
PATH_TRANSLATED C:/WEB/ch
PATH_INFO /index/article/show/id/197.html
SCRIPT_FILENAME C:/WEB/ch/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1623439748.875
REQUEST_TIME 1623439748
Environment Variablesempty
ThinkPHP Constants
LZ_VERSION v1.1.5
APP_PATH C:\WEB\ch/application/
THINK_VERSION 5.0.3
THINK_START_TIME 1623439748.875
THINK_START_MEM 264480
EXT .php
DS \
THINK_PATH C:\WEB\ch\thinkphp\
LIB_PATH C:\WEB\ch\thinkphp\library\
CORE_PATH C:\WEB\ch\thinkphp\library\think\
TRAIT_PATH C:\WEB\ch\thinkphp\library\traits\
ROOT_PATH C:\WEB\ch\
EXTEND_PATH C:\WEB\ch\extend\
VENDOR_PATH C:\WEB\ch\vendor\
RUNTIME_PATH C:\WEB\ch\runtime\
LOG_PATH C:\WEB\ch\runtime\log\
CACHE_PATH C:\WEB\ch\runtime\cache\
TEMP_PATH C:\WEB\ch\runtime\temp\
CONF_PATH C:\WEB\ch/application/
CONF_EXT .php
ENV_PREFIX PHP_
IS_CLI false
IS_WIN true