[2] ErrorException in Product.php line 285

array_merge(): Argument #1 is not an array

  1. public function comshow()
  2. {
  3. $username=input("username");
  4. $member=Db::name("member")->where(['username'=>$username])->find();
  5. $id=input("id");
  6. //产品详细信息
  7. $product=Db::name('product')->where(['id'=>$id])->find();
  8. $product["thumb"]=json_decode($product['thumb'],true);
  9. $product["thumb"]=array_merge($product["thumb"]);
  10. $product["parameter"]=json_decode($product['parameter'],true);
  11. $product["step"]=json_decode($product['step'],true);
  12. $product["content"]=Db::name("product_content")->where(["product_id"=>$product["id"]])->value("content");
  13. //好货推荐
  14. $goods=Db::name('product')->where(['member_id'=>$member['id'],'audit_status'=>1,'is_delete'=>1])->field("id,thumb,title,price,member_id")->orderRaw('rand()')->limit(0,6)->select();
  15. foreach($goods as $key=>$item){
  16. $goods[$key]["thumb"]=json_decode($item['thumb'],true);
  17. $goods[$key]["thumb"]=array_merge($goods[$key]["thumb"]);
  18. }

Call Stack

  1. in Product.php line 285
  2. at Error::appError(2, 'array_merge(): Argum...', '/home/acgroot/s02/ap...', 285, ['username' => 'jlteyishipin', 'member' => ['id' => 1015, 'group_id' => 7, 'username' => 'jlteyishipin', ...], 'id' => '1622', ...])
  3. at array_merge(null) in Product.php line 285
  4. at Product->comshow()
  5. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  6. at App::invokeMethod([object(Product), 'comshow'], []) in App.php line 611
  7. at App::module(['index', 'product', 'comshow'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  8. at App::exec(['type' => 'module', 'module' => ['index', 'product', 'comshow'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  9. at App::run() in start.php line 19
  10. at require('/home/acgroot/s02/th...') in index.php line 28

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
acgjl.qunke.com
PATH_INFO
/company/jlteyishipin/productshow/1622
REDIRECT_STATUS
200
SERVER_NAME
jlacg.baijiaxuegong.com
SERVER_PORT
443
SERVER_ADDR
10.7.2.4
REMOTE_PORT
45382
REMOTE_ADDR
18.209.209.246
SERVER_SOFTWARE
nginx/1.16.1
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/home/acgroot/s02/public
DOCUMENT_URI
/index.php
REQUEST_URI
/company/jlteyishipin/productshow/1622
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/company/jlteyishipin/productshow/1622
SCRIPT_FILENAME
/home/acgroot/s02/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711643828.5743
REQUEST_TIME
1711643828
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/home/acgroot/s02/public/../application/
FENCI_PATH
/home/acgroot/s02/public/assets/dict/
THINK_VERSION
5.0.24
THINK_START_TIME
1711643828.5746
THINK_START_MEM
381360
EXT
.php
DS
/
THINK_PATH
/home/acgroot/s02/thinkphp/
LIB_PATH
/home/acgroot/s02/thinkphp/library/
CORE_PATH
/home/acgroot/s02/thinkphp/library/think/
TRAIT_PATH
/home/acgroot/s02/thinkphp/library/traits/
ROOT_PATH
/home/acgroot/s02/
EXTEND_PATH
/home/acgroot/s02/extend/
VENDOR_PATH
/home/acgroot/s02/vendor/
RUNTIME_PATH
/home/acgroot/s02/runtime/
LOG_PATH
/home/acgroot/s02/runtime/log/
CACHE_PATH
/home/acgroot/s02/runtime/cache/
TEMP_PATH
/home/acgroot/s02/runtime/temp/
CONF_PATH
/home/acgroot/s02/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ADDON_PATH
/home/acgroot/s02/addons/