[8] ErrorException in Department.php line 55

未定义数组索引: id

  1. return $this->fetch();
  2. }
  3. public function doctor($id){
  4. $info=Doctor::where(array('id'=>$id,'status'=>1))->find();
  5. $info['dep']=\app\common\model\Department::where(array('id'=>$info['dep_id']))->value('name');
  6. $this->assign('info',$info);
  7. //医生值班表
  8. $visits=Visits::where(array('doc_id'=>$info['id']))->find();
  9. $this->assign('visits',$visits);
  10. //其他医生
  11. $user=Doctor::where(array('dep_id'=>$info['dep_id'],'status'=>1))->where('id','<>',$id)->limit(7)->select();
  12. $this->assign('user',$user);
  13. return $this->fetch();
  14. }

Call Stack

  1. in Department.php line 55
  2. at Error::appError(8, 'Undefined index: id', '/www/users/HA536768/...', 55, ['id' => 'dq', 'info' => ['dep' => null]]) in Department.php line 55
  3. at Department->doctor('dq')
  4. at ReflectionMethod->invokeArgs(object(Department), ['dq']) in App.php line 224
  5. at App::invokeMethod([object(Department), 'doctor'], []) in App.php line 389
  6. at App::module(['index', 'department', 'doctor'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], true) in App.php line 130
  7. at App::run() in start.php line 18
  8. at require('/www/users/HA536768/...') in index.php line 17

Exception Datas

Error Context
id dq
info { "dep": null }

Environment Variables

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

Server/Request Data

REDIRECT_REDIRECT_UNIQUE_ID
W85BSH8AAAEAAF08yjcAAAAH
REDIRECT_REDIRECT_STATUS
200
REDIRECT_UNIQUE_ID
W85BSH8AAAEAAF08yjcAAAAH
REDIRECT_HANDLER
application/x-httpd-php7
REDIRECT_STATUS
200
UNIQUE_ID
W85BSH8AAAEAAF08yjcAAAAH
HTTP_HOST
www.verygaydating.com
HTTP_CONNECTION
keep-alive
HTTP_ACCEPT_ENCODING
gzip, deflate
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider(compatible; HaosouSpider; http://www.haosou.com/help/help_3_2.html)
PATH
/usr/bin:/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
www.verygaydating.com
SERVER_ADDR
122.114.134.178
SERVER_PORT
80
REMOTE_ADDR
45.35.72.34
DOCUMENT_ROOT
/www/users/HA536768/WEB
SERVER_ADMIN
vhost@zzidc.com
SCRIPT_FILENAME
/www/users/HA536768/WEB/index.php
REMOTE_PORT
57817
REDIRECT_QUERY_STRING
s=/department/doctor/id/dq
REDIRECT_URL
/index.php
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
s=/department/doctor/id/dq
REQUEST_URI
/department/doctor/id/dq
SCRIPT_NAME
/index.php
ORIG_SCRIPT_FILENAME
/usr/local/zend/php7.1/bin/php-cgi
ORIG_PATH_INFO
/index.php
ORIG_PATH_TRANSLATED
/www/users/HA536768/WEB/index.php
ORIG_SCRIPT_NAME
/php71-cgi
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1540243784.5871
REQUEST_TIME
1540243784
PATH_INFO
/department/doctor/id/dq
Environment Variables
empty

ThinkPHP Constants

BIND_MODULE
index
APP_PATH
/www/users/HA536768/WEB/application/
THINK_VERSION
5.0.7
THINK_START_TIME
1540243784.5888
THINK_START_MEM
357832
EXT
.php
DS
/
THINK_PATH
/www/users/HA536768/WEB/thinkphp/
LIB_PATH
/www/users/HA536768/WEB/thinkphp/library/
CORE_PATH
/www/users/HA536768/WEB/thinkphp/library/think/
TRAIT_PATH
/www/users/HA536768/WEB/thinkphp/library/traits/
ROOT_PATH
/www/users/HA536768/WEB/
EXTEND_PATH
/www/users/HA536768/WEB/extend/
VENDOR_PATH
/www/users/HA536768/WEB/vendor/
RUNTIME_PATH
/www/users/HA536768/WEB/runtime/
LOG_PATH
/www/users/HA536768/WEB/runtime/log/
CACHE_PATH
/www/users/HA536768/WEB/runtime/cache/
TEMP_PATH
/www/users/HA536768/WEB/runtime/temp/
CONF_PATH
/www/users/HA536768/WEB/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
QINIU_FUNCTIONS_VERSION
7.1.3