#0 [0]Error in Cms.php line 81

Call to a member function toArray() on null

  1. * @param string $tableName
  2. */
  3. public function getInfo(string $id, string $tableName)
  4. {
  5. $modelName = $this->getModelName($tableName);
  6. if (empty($modelName)) {
  7. return false;
  8. }
  9. $model = '\app\common\model\\' . $modelName;
  10. $info = $model::edit($id)->toArray();
  11. // 获取字段信息
  12. $info = $this->changeInfo($tableName, $info);
  13. return $info;
  14. }
  15. /**
  16. * 获取内容页面TDK
  17. * @param $info 内容
  18. * @param $cate 栏目

Call Stack

  1. in Cms.php line 81
  2. at Cms->getInfo('index', 'article')
  3. at call_user_func_array([object(Cms), 'getInfo'], ['index', 'article']) in Facade.php line 96
  4. at Facade::__callStatic('getInfo', ['index', 'article']) in Error.php line 106
  5. at Error->info('index')
  6. at ReflectionMethod->invokeArgs(object(Error), ['index']) in Container.php line 342
  7. at Container->invokeReflectMethod(object(Error), object(ReflectionMethod), ['id' => 'index']) 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 Pipeline.php line 65
  10. at Pipeline->then(object(Closure)) in Controller.php line 113
  11. at Controller->exec() in Dispatch.php line 96
  12. at Dispatch->run() in Route.php line 747
  13. at Route->think\{closure}(object(Request)) in Pipeline.php line 59
  14. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  15. at Pipeline->then(object(Closure)) in Route.php line 748
  16. at Route->dispatch(object(Request), object(Closure)) in Http.php line 213
  17. at Http->dispatchToRoute(object(Request)) in Http.php line 203
  18. at Http->think\{closure}(object(Request)) in Pipeline.php line 59
  19. at Pipeline->think\{closure}(object(Request)) in MultiApp.php line 71
  20. at MultiApp->think\app\{closure}(object(Request)) in Pipeline.php line 59
  21. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  22. at Pipeline->then(object(Closure)) in MultiApp.php line 72
  23. at MultiApp->handle(object(Request), object(Closure))
  24. at call_user_func([object(MultiApp), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  25. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  26. at Pipeline->think\{closure}(object(Request)) in SessionInit.php line 67
  27. at SessionInit->handle(object(Request), object(Closure))
  28. at call_user_func([object(SessionInit), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  29. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 84
  30. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 65
  31. at Pipeline->then(object(Closure)) in Http.php line 204
  32. at Http->runWithRequest(object(Request)) in Http.php line 162
  33. at Http->run() in index.php line 25

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
ALLUSERSPROFILE
C:\ProgramData
APPDATA
C:\Windows\system32\config\systemprofile\AppData\Roaming
BT_PANEL
C:\BtSoft\panel
BT_PYTHON
C:\Program Files\python
BT_SETUP
C:\BtSoft
CommonProgramFiles
C:\Program Files\Common Files
CommonProgramFiles(x86)
C:\Program Files (x86)\Common Files
CommonProgramW6432
C:\Program Files\Common Files
COMPUTERNAME
winple
ComSpec
C:\Windows\system32\cmd.exe
DriverData
C:\Windows\System32\Drivers\DriverData
LOCALAPPDATA
C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS
4
OS
Windows_NT
Path
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\python;C:\Program Files\python\Scripts;C:\BtSoft\panel\script;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\BtSoft\php\56;C:\Program Files\TortoiseGit\bin;C:\Program Files\VisualSVN Server\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE
AMD64
PROCESSOR_IDENTIFIER
Intel64 Family 6 Model 85 Stepping 7, GenuineIntel
PROCESSOR_LEVEL
6
PROCESSOR_REVISION
5507
ProgramData
C:\ProgramData
ProgramFiles
C:\Program Files
ProgramFiles(x86)
C:\Program Files (x86)
ProgramW6432
C:\Program Files
PSModulePath
C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\VisualSVN Server\PowerShellModules
PUBLIC
C:\Users\Public
SystemDrive
C:
SystemRoot
C:\Windows
TEMP
C:\Windows\TEMP
TMP
C:\Windows\TEMP
UNRAR_LIB_PATH
C:\Program Files\python\Lib\site-packages\unrar\UnRAR.dll
USERDOMAIN
WORKGROUP
USERNAME
winple$
USERPROFILE
C:\Windows\system32\config\systemprofile
VISUALSVN_SERVER
C:\Program Files\VisualSVN Server\
windir
C:\Windows
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.xn--7gqv32dhl0a.cn
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
REDIRECT_STATUS
200
SERVER_NAME
qyd.winple.net
SERVER_PORT
80
SERVER_ADDR
172.27.202.72
REMOTE_PORT
20001
REMOTE_ADDR
168.206.75.124
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
C:/wwwroot/qyd.winple.net/public
DOCUMENT_URI
/index.php
REQUEST_URI
/index/news/index.html
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/index/news/index.html
PATH_INFO
SCRIPT_NAME
/index.php
SCRIPT_FILENAME
C:/wwwroot/qyd.winple.net/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1638287144.0932
REQUEST_TIME
1638287144
Environment Variables
APP_DEBUG
1
APP_DEFAULT_TIMEZONE
Asia/Shanghai
DATABASE_TYPE
mysql
DATABASE_HOSTNAME
127.0.0.1
DATABASE_DATABASE
qyd_winple_net
DATABASE_USERNAME
qyd_winple_net
DATABASE_PASSWORD
KhfxCYxGZGY8bBcE
DATABASE_HOSTPORT
3306
DATABASE_CHARSET
utf8mb4
DATABASE_DEBUG
DATABASE_PREFIX
tp_
LANG_DEFAULT_LANG
zh-cn
ThinkPHP Constants
PHP_FLOAT_DIG
15
PHP_FLOAT_EPSILON
2.2204460492503E-16
PHP_FLOAT_MIN
2.2250738585072E-308
PHP_FLOAT_MAX
1.7976931348623E+308
PHP_OS_FAMILY
Windows