[8] ErrorException in TemplateService.php line 102

未定义数组索引: opencount

  1. //获得某条模板的记录
  2. function getTemplateDetail($id)
  3. {
  4. $redismode=QuickSystem::redisMode();
  5. $today=date("Y-m-d");
  6. if($redismode){
  7. $ur=new UniRedis();
  8. $row = $ur->getTableRecord('oa_template',$id);
  9. $opencount=$row['opencount'];
  10. if(!$opencount)
  11. $opencount=1;
  12. $opencount=intval($opencount);
  13. //通过redis来一天最多更新一次opencount,可能有一天的误差,不过这个数据供参考,能接受误差
  14. if($row['opentime'] < $today){
  15. $sql="select opencount from oa_template where (id='$id')";
  16. $opencount_db=Data::sql1($sql);
  17. if($opencount > $opencount_db) {

Call Stack

  1. in TemplateService.php line 102
  2. at Error::appError(8, 'Undefined index: ope...', '/alidata/www/uni/app...', 102, ['id' => '19061506143349083695', 'redismode' => 1, 'today' => '2024-03-28', ...]) in TemplateService.php line 102
  3. at TemplateService->getTemplateDetail('19061506143349083695') in Template.php line 92
  4. at Template->detail()
  5. at ReflectionMethod->invokeArgs(object(Template), []) in Container.php line 395
  6. at Container->invokeReflectMethod(object(Template), object(ReflectionMethod), ['id' => '19061506143349083695', 'convert' => false]) in Module.php line 136
  7. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  8. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  9. at Middleware->think\{closure}(object(Request))
  10. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  11. at Middleware->dispatch(object(Request), 'controller') in Module.php line 141
  12. at Module->exec() in Dispatch.php line 168
  13. at Dispatch->run() in App.php line 432
  14. at App->think\{closure}(object(Request), object(Closure), null)
  15. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  16. at Middleware->think\{closure}(object(Request))
  17. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  18. at Middleware->dispatch(object(Request)) in App.php line 435
  19. at App->run() in index.php line 22
  20. at require('/alidata/www/uni/pub...') in index.php line 2

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.chaojibiaoge.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO /Template/detail/id/19061506143349083695
REDIRECT_STATUS 200
SERVER_NAME www.chaojibiaoge.com
SERVER_PORT 443
SERVER_ADDR 10.24.193.22
REMOTE_PORT 35594
REMOTE_ADDR 34.204.177.148
SERVER_SOFTWARE nginx/1.12.1
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /alidata/www/uni
DOCUMENT_URI /index.php/Template/detail/id/19061506143349083695
REQUEST_URI /Template/detail/id/19061506143349083695
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /alidata/www/uni/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php/Template/detail/id/19061506143349083695
REQUEST_TIME_FLOAT 1711622630.5553
REQUEST_TIME 1711622630
Environment Variablesempty
ThinkPHP Constants
FILTER_VALIDATE_BOOL 258
HTMLPURIFIER_PREFIX /alidata/www/uni/vendor/ezyang/htmlpurifier/library