返回列表 发帖
查看: 797|回复: 2

[已处理] 回复帖子偶尔出现count(): Argument #1 ($value) must be of type Countable|array, null given

6

主题

28

回帖

44

积分

初学乍练

贡献
0 点
金币
5 个
发表于 2023-5-5 02:13:55 | 显示全部楼层 |阅读模式
BUG反馈
程序版本: X3.5
浏览器: FireFox Chrome 
BUG地址: 隐藏内容
BUG截图: -
测试用户名: 隐藏内容
测试密码: 隐藏内容
Discuz! X3.5 Release 20230316 PHP8.2环境下载回复帖子有时候偶尔出现此错误,切换到php7.4不会出现。
count(): Argument #1 ($value) must be of type Countable|array, null given
PHP:forum.php#require(%s):0071
source/module/forum/forum_post.php#require_once(%s):0364
source/include/post/post_newreply.php#discuz_container->discuz_container->__call():0420
source/class/discuz/discuz_container.php#discuz_container->discuz_container->_call():0055
source/class/discuz/discuz_container.php#extend_thread_allowat->extend_thread_allowat->before_newreply():0084
source/class/extend/extend_thread_allowat.php#break():0084

1 贡献

最佳答案

source\class\extend\extend_thread_allowat.php

  1. $atlist_tmp = $ateduids = array();
复制代码
改为
  1. $this->atlist = $atlist_tmp = $ateduids = array();
复制代码

回复

使用道具 举报

17

主题

568

回帖

1816

积分

应用开发者

贡献
63 点
金币
902 个
QQ
发表于 2023-5-5 03:18:04 | 显示全部楼层
source\class\extend\extend_thread_allowat.php

  1. $atlist_tmp = $ateduids = array();
复制代码
改为
  1. $this->atlist = $atlist_tmp = $ateduids = array();
复制代码

回复 支持 反对

使用道具 举报

6

主题

28

回帖

44

积分

初学乍练

贡献
0 点
金币
5 个
 楼主| 发表于 2023-5-5 15:36:58 | 显示全部楼层
谢谢楼上的大神,您的方法解决了此问题。
回复 支持 反对

使用道具 举报

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

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2024-5-4 11:25 , Processed in 0.037397 second(s), 9 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2024 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表