Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

discuz x3.2 的1个bug

[复制链接]
275757820 发表于 2014-10-22 11:08:24 | 显示全部楼层 |阅读模式
本帖最后由 275757820 于 2014-10-22 12:44 编辑

所有浏览器都有可能出现

bug现象:
   论坛内部某个帖子的回复数量与显示不符合

bug位置:
   source/module/forum/forum_viewthread.php(约642行)
   

bug原因:
   $hotpostarr 的key 是 pid
   $postarr 的key 是 position
   假定 a 在 $hotpostarr 中, b 在 $postarr 中, 那么当 a的pid = b的position 时,新的 $postarr 中 就会因为先 $hotpostarr 后 $postarr 而导致 $postarr 中的b 不在 新的$postarr 故此丢失了b

修复方法:
   将红圈内容修改为$postarr=array_merge((array)$sticklist,(array)$hotpostarr,$postarr);



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

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

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-2-25 19:04 , Processed in 0.026597 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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