[8] ErrorException in Shop.php line 157

未定义数组索引: oprice

  1. $goodsInfo = model('goods')->where($map)->find()->toArray();
  2. if (!$goodsInfo){
  3. return false;
  4. }
  5. $goodsInfo['price'] = number_format($goodsInfo['price'], 2);
  6. $goodsInfo['oprice'] = number_format($goodsInfo['oprice'], 2);
  7. if ($goodsInfo['is_sku']) {
  8. $sku_item = json_decode($goodsInfo['goods_sku_info'], true);
  9. $goodsInfo['sku_item'] = $sku_item;
  10. $sku_data = db('sku_list')->where(array('goods_id' => $id, "status" => '0','is_del'=>'0'))->order('attr_list asc')->select();
  11. $sku_data = deal_sku_data($sku_data);

Call Stack

  1. in Shop.php line 157
  2. at Error::appError(8, 'Undefined index: opr...', '/www/wwwroot/127.0.0...', 157, ['id' => '232', 'map' => ['id' => '232', 'is_del' => 0, 'is_sale' => 1], 'goodsInfo' => ['id' => 232, 'cate_id' => 4, 'series_id' => 28, ...]]) in Shop.php line 157
  3. at Shop->proDet()
  4. at ReflectionMethod->invokeArgs(object(Shop), []) in App.php line 343
  5. at App::invokeMethod([object(Shop), 'prodet'], []) in App.php line 606
  6. at App::module(['index', 'shop', 'prodet'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 457
  7. at App::exec(['type' => 'module', 'module' => ['index', 'shop', 'prodet']], ['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('/www/wwwroot/127.0.0...') in index.php line 20

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
SCRIPT_FILENAME
/www/wwwroot/127.0.0.1/public/index.php
QUERY_STRING
REQUEST_METHOD
GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME
/index.php
REQUEST_URI
/index/shop/prodet/id/232
DOCUMENT_URI
/index.php//index/shop/prodet/id/232
DOCUMENT_ROOT
/www/wwwroot/127.0.0.1/public
SERVER_PROTOCOL
HTTP/1.1
REQUEST_SCHEME
http
GATEWAY_INTERFACE
CGI/1.1
SERVER_SOFTWARE
nginx/1.16.0
REMOTE_ADDR
154.210.32.178
REMOTE_PORT
20015
SERVER_ADDR
172.19.240.141
SERVER_PORT
80
SERVER_NAME
47.103.96.136
REDIRECT_STATUS
200
PATH_INFO
//index/shop/prodet/id/232
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
HTTP_HOST
www.zxlhm.com
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
deflate, gzip
PHP_SELF
/index.php//index/shop/prodet/id/232
REQUEST_TIME_FLOAT
1582609521.9646
REQUEST_TIME
1582609521
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/127.0.0.1/public/../application/
THINK_VERSION
5.0.20
THINK_START_TIME
1582609521.965
THINK_START_MEM
259472
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/127.0.0.1/thinkphp/
LIB_PATH
/www/wwwroot/127.0.0.1/thinkphp/library/
CORE_PATH
/www/wwwroot/127.0.0.1/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/127.0.0.1/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/127.0.0.1/
EXTEND_PATH
/www/wwwroot/127.0.0.1/extend/
VENDOR_PATH
/www/wwwroot/127.0.0.1/vendor/
RUNTIME_PATH
/www/wwwroot/127.0.0.1/runtime/
LOG_PATH
/www/wwwroot/127.0.0.1/runtime/log/
CACHE_PATH
/www/wwwroot/127.0.0.1/runtime/cache/
TEMP_PATH
/www/wwwroot/127.0.0.1/runtime/temp/
CONF_PATH
/www/wwwroot/127.0.0.1/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false