[2] ErrorException in Cms.php line 34

array_merge(): Argument #1 is not an array

  1. }
  2. public function show()
  3. {
  4. $contentid = input('route.id', '0', 'intval');
  5. $modelone = Db::name('model')->where('id', $this->cateone['modelid'])->find();
  6. $one = Db::name($modelone['main_tablename'])->where('id', $contentid)->find();
  7. $one_data = Db::name($modelone['ext_tablename'])->where('extcontentid', $contentid)->find();
  8. $content = array_merge($one, $one_data);
  9. // 更新浏览次数 第三个参数:延时3秒更新,减轻服务器压力
  10. Db::name($modelone['main_tablename'])->where('id', $contentid)->setInc('hits', 1, 3);
  11. $prevone = Db::name($modelone['main_tablename'])->where('cateid', $this->cateid)->where('id', '<', $contentid)->find();
  12. if ($prevone) {
  13. $content['prev']['title'] = $prevone['title'];
  14. $content['prev']['link'] = '/' . $this->lang . '/' . 'list-' . $this->cateid . '/' . $prevone['id'];
  15. } else {

Call Stack

  1. in Cms.php line 34
  2. at Error::appError(2, 'array_merge(): Argum...', '/home/zhonghanghangm...', 34, ['contentid' => 875, 'modelone' => ['id' => 2, 'groupid' => '...', 'typeid' => 1, ...], 'one' => null, ...])
  3. at array_merge(null, null) in Cms.php line 34
  4. at Cms->show()
  5. at ReflectionMethod->invokeArgs(object(Cms), []) in Container.php line 395
  6. at Container->invokeReflectMethod(object(Cms), object(ReflectionMethod), ['lang' => '', 'cateid' => '15', 'id' => '875', ...]) in Module.php line 131
  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 136
  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 24

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookies
home_lang cn
Sessionempty
Server/Request Data
REDIRECT_REDIRECT_UNIQUE_ID ZgXT2Yd1zUiF4TlAD@56mAAAAAY
REDIRECT_REDIRECT_PHPRC /home/zhonghanghangmzqhaofn1gsh1a2nsgkh0aln4g/others
REDIRECT_REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID ZgXT2Yd1zUiF4TlAD@56mAAAAAY
REDIRECT_PHPRC /home/zhonghanghangmzqhaofn1gsh1a2nsgkh0aln4g/others
REDIRECT_HANDLER php-cgi
REDIRECT_STATUS 200
UNIQUE_ID ZgXT2Yd1zUiF4TlAD@56mAAAAAY
PHPRC /home/zhonghanghangmzqhaofn1gsh1a2nsgkh0aln4g/others
HTTP_X_FORWARDED_FOR 44.222.249.19
HTTP_X_REAL_IP 44.222.249.19
HTTP_HOST www.zhonghanghangte.cn
HTTP_CONNECTION close
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PATH /sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE <address>Apache Server at www.zhonghanghangte.cn Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME www.zhonghanghangte.cn
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 44.222.249.19
DOCUMENT_ROOT /home/zhonghanghangmzqhaofn1gsh1a2nsgkh0aln4g/wwwroot
REQUEST_SCHEME http
CONTEXT_PREFIX /php-run-as-cgi
CONTEXT_DOCUMENT_ROOT /usr/php7.2/bin
SERVER_ADMIN webmaster@zhonghanghang
SCRIPT_FILENAME /home/zhonghanghangmzqhaofn1gsh1a2nsgkh0aln4g/wwwroot/index.php
REMOTE_PORT 48202
REDIRECT_URL /index.php/list-15/875.html
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /list-15/875.html
SCRIPT_NAME /index.php
PATH_INFO /list-15/875.html
PATH_TRANSLATED /home/zhonghanghangmzqhaofn1gsh1a2nsgkh0aln4g/wwwroot/list-15/875.html
ORIG_PATH_INFO /index.php/list-15/875.html
ORIG_SCRIPT_NAME /php-run-as-cgi/php-cgi
ORIG_SCRIPT_FILENAME /usr/php7.2/bin/php-cgi
ORIG_PATH_TRANSLATED /home/zhonghanghangmzqhaofn1gsh1a2nsgkh0aln4g/wwwroot/index.php/list-15/875.html
PHP_SELF /index.php/list-15/875.html
REQUEST_TIME_FLOAT 1711657945.3539
REQUEST_TIME 1711657945
Environment Variablesempty
ThinkPHP Constants
FILTER_VALIDATE_BOOL 258
PINYIN_DEFAULT 4096
PINYIN_TONE 2
PINYIN_NO_TONE 4
PINYIN_ASCII_TONE 8
PINYIN_NAME 16
PINYIN_KEEP_NUMBER 32
PINYIN_KEEP_ENGLISH 64
PINYIN_UMLAUT_V 128
PINYIN_KEEP_PUNCTUATION 256
QINIU_FUNCTIONS_VERSION 7.4.0