#0 [8192]ErrorException in Section.php line 29

addslashes(): Passing null to parameter #1 ($string) of type string is deprecated

  1. $artId = intval(addslashes(Request::param('id')));
  2. if($artId==0)$this->error("请按规矩");
  3. $where['id'] = $artId;
  4. $Article = Db::name('article');
  5. //$id =intval(addslashes(Request::param('id')));
  6. //itemid主菜单项目,取得列表页左侧菜单项。菜单项pid=$itemid
  7. $itemid = intval(addslashes(Request::param('itemid')));
  8. //dump($artId);
  9. $menuItem = Db::name('menuItem');
  10. //取得此一级菜单的菜单名
  11. //echo $id;
  12. //echo '<br>'.$itemid;
  13. $menuTitle = $menuItem->field('name,link')->getById($itemid);
  14. //取得列表页的导航
  15. //echo $menuTitle['name'];

Call Stack

  1. in Section.php line 29
  2. at Error->appError(8192, 'addslashes(): Passin...', 'E:\wangzhan\www\sled...', 29)
  3. at addslashes(null) in Section.php line 29
  4. at Section->view()
  5. at ReflectionMethod->invokeArgs(object(Section), []) in Container.php line 344
  6. at Container->invokeReflectMethod(object(Section), object(ReflectionMethod), ['id' => '22']) in Controller.php line 110
  7. at Controller->think\route\dispatch\{closure}(object(Request)) in Pipeline.php line 59
  8. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  9. at Pipeline->then(object(Closure)) in Controller.php line 84
  10. at Controller->exec() in Dispatch.php line 90
  11. at Dispatch->run() in Route.php line 785
  12. at Route->think\{closure}(object(Request)) in Pipeline.php line 59
  13. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  14. at Pipeline->then(object(Closure)) in Route.php line 784
  15. at Route->dispatch(object(Request), object(Closure)) in Http.php line 216
  16. at Http->dispatchToRoute(object(Request)) in Http.php line 206
  17. at Http->think\{closure}(object(Request)) in Pipeline.php line 59
  18. at Pipeline->think\{closure}(object(Request)) in MultiApp.php line 71
  19. at MultiApp->think\app\{closure}(object(Request)) in Pipeline.php line 59
  20. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  21. at Pipeline->then(object(Closure)) in MultiApp.php line 70
  22. at MultiApp->handle(object(Request), object(Closure))
  23. at call_user_func([object(MultiApp), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  24. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  25. at Pipeline->think\{closure}(object(Request)) in SessionInit.php line 67
  26. at SessionInit->handle(object(Request), object(Closure))
  27. at call_user_func([object(SessionInit), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  28. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  29. at Pipeline->think\{closure}(object(Request)) in TraceDebug.php line 71
  30. at TraceDebug->handle(object(Request), object(Closure))
  31. at call_user_func([object(TraceDebug), 'handle'], object(Request), object(Closure)) in Middleware.php line 142
  32. at Middleware->think\{closure}(object(Request), object(Closure)) in Pipeline.php line 85
  33. at Pipeline->think\{closure}(object(Request)) in Pipeline.php line 66
  34. at Pipeline->then(object(Closure)) in Http.php line 205
  35. at Http->runWithRequest(object(Request)) in Http.php line 170
  36. at Http->run() in index.php line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
REDIRECT_PATH_INFO mycms/Section/view/id/22
REDIRECT_STATUS 200
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
HTTP_HOST www.slypzx.com
PATH C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;E:\wangzhan\bin\php\php8.2.13;C:\ProgramData\ComposerSetup\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
SystemRoot C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\Windows
SERVER_SIGNATURE <address>Apache/2.4.58 (Win64) PHP/8.2.13 mod_fcgid/2.3.10-dev Server at www.slypzx.com Port 80</address>
SERVER_SOFTWARE Apache/2.4.58 (Win64) PHP/8.2.13 mod_fcgid/2.3.10-dev
SERVER_NAME www.slypzx.com
SERVER_ADDR 192.168.10.207
SERVER_PORT 80
REMOTE_ADDR 44.223.40.255
DOCUMENT_ROOT E:/wangzhan/www/sledu/public
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT E:/wangzhan/www/sledu/public
SERVER_ADMIN wampserver@wampserver.invalid
SCRIPT_FILENAME E:/wangzhan/www/sledu/public/index.php
REMOTE_PORT 58424
REDIRECT_URL /mycms/Section/view/id/22
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /mycms/Section/view/id/22
SCRIPT_NAME /index.php
PATH_INFO /mycms/Section/view/id/22
PATH_TRANSLATED redirect:\index.php\mycms\Section\view\id\22\Section\view\id\22
PHP_SELF /index.php/mycms/Section/view/id/22
REQUEST_TIME_FLOAT 1711689855.2791
REQUEST_TIME 1711689855
0.013334s