久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

Discuz! 官方交流社區(qū)

標(biāo)題: 這個(gè)是什么問題?Cannot use string offset as an array [打印本頁]

作者: 470342341    時(shí)間: 2023-4-23 15:33
標(biāo)題: 這個(gè)是什么問題?Cannot use string offset as an array

(, 下載次數(shù): 6)



Discuz! System Error
Time: 2023-04-23 15:30:46 IP: 182.121.85.99 BackTraceID: 9ff807d727419eb452abdc125c8f565d

Cannot use string offset as an array
PHP Debug

No.        File        Line        Code
1        index.php        142        require(%s)
2        forum.php        71        require(%s)
3        source/module/forum/forum_index.php        439        include(%s)
4        data/template/1_diy_forum_discuz.tpl.php        472        include(%s)
5        data/template/1_1_common_footer.tpl.php        124        output()
6        source/function/function_core.php        1164        block_updatecache()
7        source/function/function_block.php        237        block_thread->getdata()
8        source/class/block/forum/block_thread.php        364        block_thread->getmaxid()
9        source/class/block/forum/block_thread.php        564        break()


升級 3.5   經(jīng)常出現(xiàn)這個(gè)  問題  刷新就正常了 ,但是說不定 什么時(shí)候就又 提示這個(gè),每次刷新就恢復(fù)正常

作者: 1314學(xué)習(xí)網(wǎng)    時(shí)間: 2023-4-23 15:44
本帖最后由 1314學(xué)習(xí)網(wǎng) 于 2023-4-23 15:49 編輯


應(yīng)該是php8兼容性問題

打開 source\class\block\forum\block_thread.php
找到
  1. $data = getglobal('cache/databasemaxid');
復(fù)制代碼
改為
  1. $data = getglobal('cache/databasemaxid');
  2.                 if(!is_array($data)) {
  3.                         $data = array();
  4.                 }
復(fù)制代碼

作者: 470342341    時(shí)間: 2023-4-23 18:10
1314學(xué)習(xí)網(wǎng) 發(fā)表于 2023-4-23 15:44
應(yīng)該是php8兼容性問題

打開 source\class\block\forum\block_thread.php

但是我的是php 7.4啊  不是 8
作者: 湖中沉    時(shí)間: 2023-4-23 18:54
470342341 發(fā)表于 2023-4-23 18:10
但是我的是php 7.4啊  不是 8

你先照著改,看看解決問題沒啊
作者: 470342341    時(shí)間: 2023-4-23 19:24
湖中沉 發(fā)表于 2023-4-23 18:54
你先照著改,看看解決問題沒啊

好吧 我得 觀察下 這個(gè)是隨機(jī)性 故障 不是 每次都出現(xiàn)  說不定什么時(shí)候出現(xiàn),




歡迎光臨 Discuz! 官方交流社區(qū) (http://www.9999xn.com/) Powered by Discuz! W1.0