[2] ErrorException in Channel.php line 47

strlen() expects parameter 1 to be string, array given

  1. $multiple = $this->request->get('multiple/d', 0);
  2. $params = [];
  3. $filter = $this->request->get();
  4. $filter = array_diff_key($filter, array_flip(['orderby', 'orderway', 'page', 'multiple']));
  5. if (isset($filter['filter'])) {
  6. $filter = array_merge($filter, $filter['filter']);
  7. }
  8. if ($filter) {
  9. $filter = array_filter($filter, 'strlen');
  10. $params['filter'] = $filter;
  11. $params = $filter;
  12. }
  13. if ($orderby) {
  14. $params['orderby'] = $orderby;
  15. }
  16. if ($orderway) {
  17. $params['orderway'] = $orderway;
  18. }

Call Stack

  1. in Channel.php line 47
  2. at Error::appError(2, 'strlen() expects par...', '/www/wwwroot/hengxiu...', 47, ['config' => ['system_user_id' => '1', 'sitename' => '恒修居', 'sitelogo' => '/uploads/20210126/0b...', ...], 'diyname' => null, 'channel' => object(Channel), ...])
  3. at strlen(['chao' => '未知'])
  4. at array_filter(['filter' => ['chao' => '未知'], 'chao' => '未知'], 'strlen') in Channel.php line 47
  5. at Channel->index()
  6. at call_user_func_array([object(Channel), 'index'], []) in Route.php line 76
  7. at Route->execute('cms', 'channel', 'index')
  8. at ReflectionMethod->invokeArgs(object(Route), ['cms', 'channel', 'index']) in App.php line 343
  9. at App::invokeMethod(['\think\addons\Route', 'execute'], ['filter' => ['chao' => '未知'], 'id' => '39', 'addon' => 'cms', ...]) in App.php line 470
  10. at App::exec(['type' => 'method', 'method' => ['\think\addons\Route', 'execute'], 'var' => ['addon' => 'cms', 'controller' => 'channel', 'action' => 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('/www/wwwroot/hengxiu...') in index.php line 23

Environment Variables

GET Data

filter
{ "chao": "\u672a\u77e5" }
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.hengxiuju.com
PATH_INFO
/39.html
REDIRECT_STATUS
200
SERVER_NAME
hengxiuju.com
SERVER_PORT
443
SERVER_ADDR
172.25.30.221
REMOTE_PORT
35614
REMOTE_ADDR
44.192.132.66
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/hengxiuju/public
DOCUMENT_URI
/index.php
REQUEST_URI
/39.html?filter%5Bchao%5D=%E6%9C%AA%E7%9F%A5
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/39.html&filter%5Bchao%5D=%E6%9C%AA%E7%9F%A5
SCRIPT_FILENAME
/www/wwwroot/hengxiuju/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711645789.6353
REQUEST_TIME
1711645789
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/hengxiuju/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711645789.6357
THINK_START_MEM
405416
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/hengxiuju/thinkphp/
LIB_PATH
/www/wwwroot/hengxiuju/thinkphp/library/
CORE_PATH
/www/wwwroot/hengxiuju/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/hengxiuju/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/hengxiuju/
EXTEND_PATH
/www/wwwroot/hengxiuju/extend/
VENDOR_PATH
/www/wwwroot/hengxiuju/vendor/
RUNTIME_PATH
/www/wwwroot/hengxiuju/runtime/
LOG_PATH
/www/wwwroot/hengxiuju/runtime/log/
CACHE_PATH
/www/wwwroot/hengxiuju/runtime/cache/
TEMP_PATH
/www/wwwroot/hengxiuju/runtime/temp/
CONF_PATH
/www/wwwroot/hengxiuju/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
HTMLPURIFIER_PREFIX
/www/wwwroot/hengxiuju/vendor/ezyang/htmlpurifier/library
ADDON_PATH
/www/wwwroot/hengxiuju/addons/