[8] ErrorException in Goods.php line 195

未定义数组索引: attachment

  1. $goods['goods_show_price'] = '暂未销售';
  2. $goods['goods_ticket_price'] = -2;
  3. $goods['goods_payment_price'] = -2;
  4. }
  5. }
  6. }
  7. $goods_pics = [];
  8. if($goods['attachment']){
  9. foreach ($goods['attachment'] as $value){
  10. $goods_pics[] = getOssFile($value['attachment_file_path'],false);
  11. }
  12. }else{
  13. $goods_pics[] = getOssFile('',false);
  14. }
  15. $goods['goods_pics'] = $goods_pics;
  16. $goods['goods_true_price'] = (float) $goods['goods_true_price'];
  17. $goods['goods_inventory'] = 0;

Call Stack

  1. in Goods.php line 195
  2. at Error::appError(8, 'Undefined index: att...', '/home/www/scryyy/app...', 195, ['goods' => ['goods_logo' => 'http://ryyy.oss-cn-s...', 'goods_suggest_price' => '-', 'goods_true_price' => -1, ...], 'goods_pics' => []]) in Goods.php line 195
  3. at Goods->getGoodsItem(['goods_logo' => 'http://ryyy.oss-cn-s...', 'goods_suggest_price' => '-', 'goods_true_price' => -1, ...]) in Goods.php line 88
  4. at Goods->getOne(['goods_id' => null]) in Product.php line 141
  5. at Product->detail()
  6. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  7. at App::invokeMethod([object(Product), 'detail'], []) in App.php line 595
  8. at App::module(['home', 'Product', 'detail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['home', 'Product', 'detail']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/home/www/scryyy/thi...') in index.php line 5

Environment Variables

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

Server/Request Data

USER
apache
HOME
/usr/share/httpd
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.scryyy.com
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
REDIRECT_STATUS
200
SERVER_NAME
www.scryyy.com
SERVER_PORT
80
SERVER_ADDR
172.24.155.40
REMOTE_PORT
20000
REMOTE_ADDR
182.161.61.174
SERVER_SOFTWARE
nginx/1.12.2
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/home/www/scryyy/public
DOCUMENT_URI
/index.php
REQUEST_URI
/home/Product/detail/id/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/home/Product/detail/id/
SCRIPT_FILENAME
/home/www/scryyy/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1566573697.0391
REQUEST_TIME
1566573697
PATH_INFO
/home/Product/detail/id/
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/www/scryyy/public/../application/
THINK_VERSION
5.0.15
THINK_START_TIME
1566573697.0394
THINK_START_MEM
407880
EXT
.php
DS
/
THINK_PATH
/home/www/scryyy/thinkphp/
LIB_PATH
/home/www/scryyy/thinkphp/library/
CORE_PATH
/home/www/scryyy/thinkphp/library/think/
TRAIT_PATH
/home/www/scryyy/thinkphp/library/traits/
ROOT_PATH
/home/www/scryyy/
EXTEND_PATH
/home/www/scryyy/extend/
VENDOR_PATH
/home/www/scryyy/vendor/
RUNTIME_PATH
/home/www/scryyy/runtime/
LOG_PATH
/home/www/scryyy/runtime/log/
CACHE_PATH
/home/www/scryyy/runtime/cache/
TEMP_PATH
/home/www/scryyy/runtime/temp/
CONF_PATH
/home/www/scryyy/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ORDER_STATUS_INIT
0
ORDER_STATUS_PAID
1
ORDER_STATUS_CONFIRM
2
ORDER_STATUS_OUTSTOCK
3
ORDER_STATUS_DELIVERY
4
ORDER_STATUS_FINISHED
5
ORDER_STATUS_CLOSED
9