[8] ErrorException in Index.php line 130

Trying to get property of non-object

  1. {
  2. $id= $this->request->param('id','');
  3. if(empty($id)){
  4. abort(404);
  5. }
  6. $model = Pavilion::get($id);
  7. $items = Expo::where(['pavilion_id'=>$id])->order('start_time asc')->select();
  8. $xg = Pavilion::where(['country_id'=>$model->country_id])->select();
  9. $this->assign([
  10. 'model'=>$model,
  11. 'items'=>$items,
  12. 'xg'=> $xg
  13. ]);
  14. return $this->fetch();
  15. }

Call Stack

  1. in Index.php line 130
  2. at Error::appError(8, 'Trying to get proper...', '/home/wwwroot/jdfair...', 130, ['id' => '6c5b651f3d970b76', 'model' => null, 'items' => []]) in Index.php line 130
  3. at Index->p()
  4. at ReflectionMethod->invokeArgs(object(Index), []) in App.php line 343
  5. at App::invokeMethod([object(Index), 'p'], []) in App.php line 611
  6. at App::module(['index', 'index', 'p'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  7. at App::exec(['type' => 'module', 'module' => ['index', 'index', 'p'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  8. at App::run() in start.php line 19
  9. at require('/home/wwwroot/jdfair...') in index.php line 17

Environment Variables

GET Data

/p/6c5b651f3d970b76_html
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
jdfair
HOME
/home/wwwroot/jdfair
SCRIPT_NAME
/index.php
REQUEST_URI
/p/6c5b651f3d970b76.html
QUERY_STRING
/p/6c5b651f3d970b76.html
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.0
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
/p/6c5b651f3d970b76.html
REDIRECT_URL
/p/6c5b651f3d970b76.html
REMOTE_PORT
39690
SCRIPT_FILENAME
/home/wwwroot/jdfair/wwwroot/public/index.php
SERVER_ADMIN
[no address given]
CONTEXT_DOCUMENT_ROOT
/home/wwwroot/jdfair/wwwroot/public
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/home/wwwroot/jdfair/wwwroot/public
REMOTE_ADDR
44.192.53.34
SERVER_PORT
80
SERVER_ADDR
127.0.0.1
SERVER_NAME
jdfair.com
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_X_FORWARDED_PROTO
https
HTTP_ACCEPT_ENCODING
gzip
HTTP_SSL_FLAG
SSL
HTTP_FROM_HTTPS
on
HTTP_CONNECTION
close
HTTP_HOST
jdfair.com
HTTP_X_REAL_IP
211.149.140.180
proxy-nokeepalive
1
REDIRECT_STATUS
200
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711620138.3592
REQUEST_TIME
1711620138
PATH_INFO
/p/6c5b651f3d970b76.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/wwwroot/jdfair/wwwroot/public/../app/
THINK_VERSION
5.0.24
THINK_START_TIME
1711620138.3595
THINK_START_MEM
362728
EXT
.php
DS
/
THINK_PATH
/home/wwwroot/jdfair/wwwroot/thinkphp/
LIB_PATH
/home/wwwroot/jdfair/wwwroot/thinkphp/library/
CORE_PATH
/home/wwwroot/jdfair/wwwroot/thinkphp/library/think/
TRAIT_PATH
/home/wwwroot/jdfair/wwwroot/thinkphp/library/traits/
ROOT_PATH
/home/wwwroot/jdfair/wwwroot/
EXTEND_PATH
/home/wwwroot/jdfair/wwwroot/extend/
VENDOR_PATH
/home/wwwroot/jdfair/wwwroot/vendor/
RUNTIME_PATH
/home/wwwroot/jdfair/wwwroot/runtime/
LOG_PATH
/home/wwwroot/jdfair/wwwroot/runtime/log/
CACHE_PATH
/home/wwwroot/jdfair/wwwroot/runtime/cache/
TEMP_PATH
/home/wwwroot/jdfair/wwwroot/runtime/temp/
CONF_PATH
/home/wwwroot/jdfair/wwwroot/public/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false