精彩推荐

Discuz!DatabaseError(1064)forum_filter_post表limit-1错误的解决办法

1054人阅读  0人回复   查看全部 | 阅读模式 | 复制链接   

1

主题

1

帖子

5

积分

新手上路

Rank: 1

积分
5
发表于 2015-4-15 07:21:02
原因分析:
$remainhots = $remainhots - count($hotpids);
$remainhots 可能为负,
DZ代码 if($remainhots) 后直接用于 limit $remainhots,所以出现了limit -1错误(当然不一定是-1,数字不是固定的)

1.jpg
解决办法:
打开:source\module\forum\forum_viewthread.php

找到

  1. if($_G['setting']['nofilteredpost'] && $_G['forum_thread']['replies'] > $_G['setting']['postperpage'] && $remainhots) {
复制代码


修改为

  1. if($_G['setting']['nofilteredpost'] && $_G['forum_thread']['replies'] > $_G['setting']['postperpage'] && $remainhots >0) {
复制代码


也就是将 $remainhots 改为 $remainhots >0
回复

使用道具 举报

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