找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 126|回复: 6

(已解决)部分页面会报错

[复制链接]
发表于 昨天 21:40 | 显示全部楼层 |阅读模式
报错页面:https://bbs.wuyou.net/forum.php?mod=forumdisplay&fid=81&page=10
https://bbs.wuyou.net/forum.php?mod=forumdisplay&fid=30&page=53

截屏2026-03-25 21.30.32.png

前后页面正常,感觉是因为php 8.4.19 触发,不允许字符串用"+"号连接,要用".",没找到是哪个代码触发的,要如何修正?

https://bbs.wuyou.net/forum.php?mod=forumdisplay&fid=81&page=9
https://bbs.wuyou.net/forum.php?mod=forumdisplay&fid=81&page=11
这种情况多次看到。


发表于 昨天 22:04 | 显示全部楼层
不明白
回复

使用道具 举报

发表于 昨天 22:24 | 显示全部楼层
AI回答:
source/app/forum/module/forumdisplay.php
找到 第 1539 行
$thread['excerpt'] = cutstr($thread['excerpt'], $excerptlength, $excerptmore) + $thread['excerptmore'];
修改为:
$thread['excerpt'] = cutstr($thread['excerpt'], $excerptlength, $excerptmore) . $thread['excerptmore'];
回复

使用道具 举报

发表于 昨天 22:52 | 显示全部楼层
测试会报错
回复

使用道具 举报

 楼主| 发表于 昨天 23:05 | 显示全部楼层
经分析,已经找到原因。凡是有被标记移动的帖子,其浏览量为"-",不是数字,出现在哪一列表页中,这一页就会出错。

修复方法如下:
source/app/forum/module/forumdisplay.php

第770行
  1. $_G['forum_threadlist'][$index]['views'] += $value['addviews'];
复制代码


改为

  1. $_G['forum_threadlist'][$index]['views'] = intval($_G['forum_threadlist'][$index]['views']) + intval($value['addviews']);
复制代码

回复

使用道具 举报

发表于 1 小时前 | 显示全部楼层
感谢分享
回复

使用道具 举报

发表于 半小时前 | 显示全部楼层
速度不错
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持| 无忧启动 ( 闽ICP备05002490号-1|闽公网安备35020302032614号 )

GMT+8, 2026-3-26 07:52

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表