[2] ErrorException in Base.php line 102

Invalid argument supplied for foreach()

  1. if ($this->cid || $this->pid) {
  2. $category = (new Category())->getListByPid($this->pid ?: $this->cid);
  3. $this->category = $category;
  4. $this->view->assign('category', $category);
  5. }
  6. }
  7. public function reloadAssignCategory($type = 'product', $all = false, $child = false)
  8. {
  9. foreach ($this->category as $k => &$v) {
  10. switch ($type) {
  11. case 'live':
  12. $l = new Live();
  13. if ($child) {
  14. $where = $l->getWhereByCid($v['id'], 1);
  15. } else {
  16. $where = $l->getWhereByCid($v['id'], 2);
  17. }

Call Stack

  1. in Base.php line 102
  2. at Error::appError(2, 'Invalid argument sup...', '/www/wwwroot/001yixu...', 102, ['type' => 'conference', 'all' => true, 'child' => false]) in Base.php line 102
  3. at Base->reloadAssignCategory('conference', true) in Conference.php line 29
  4. at Conference->onLine()
  5. at ReflectionMethod->invokeArgs(object(Conference), []) in App.php line 343
  6. at App::invokeMethod([object(Conference), 'onLine'], []) in App.php line 611
  7. at App::module(['index', 'conference', 'onLine'], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '', ...], false) in App.php line 456
  8. at App::exec(['type' => 'module', 'module' => ['index', 'conference', 'onLine']], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '', ...]) in App.php line 139
  9. at App::run() in start.php line 19
  10. at require('/www/wwwroot/001yixu...') in index.php line 27

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_CONNECTION
Keep-Alive
HTTP_HOST
www.001yixue.com
HTTP_ACCEPT_ENCODING
br,gzip
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT
CCBot/2.0 (https://commoncrawl.org/faq/)
PATH_INFO
/index/conference/onLine/cid/www.caim.org.cn
REDIRECT_STATUS
200
SERVER_NAME
001yixue.com
SERVER_PORT
443
SERVER_ADDR
172.19.6.213
REMOTE_PORT
42728
REMOTE_ADDR
3.235.182.206
SERVER_SOFTWARE
nginx/1.18.0
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/001yixue.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/index/conference/onLine/cid/www.caim.org.cn
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/index/conference/onLine/cid/www.caim.org.cn
SCRIPT_FILENAME
/www/wwwroot/001yixue.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1720838502.9043
REQUEST_TIME
1720838502
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/001yixue.com/public/../application/
CONSTANT_NAME
about
THINK_VERSION
5.0.24
THINK_START_TIME
1720838502.9554
THINK_START_MEM
387328
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/001yixue.com/thinkphp/
LIB_PATH
/www/wwwroot/001yixue.com/thinkphp/library/
CORE_PATH
/www/wwwroot/001yixue.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/001yixue.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/001yixue.com/
EXTEND_PATH
/www/wwwroot/001yixue.com/extend/
VENDOR_PATH
/www/wwwroot/001yixue.com/vendor/
RUNTIME_PATH
/www/wwwroot/001yixue.com/runtime/
LOG_PATH
/www/wwwroot/001yixue.com/runtime/log/
CACHE_PATH
/www/wwwroot/001yixue.com/runtime/cache/
TEMP_PATH
/www/wwwroot/001yixue.com/runtime/temp/
CONF_PATH
/www/wwwroot/001yixue.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/www/wwwroot/001yixue.com/addons/