返回列表 发帖
查看: 833|回复: 1

[已解决] 兼容php8代码

12

主题

88

回帖

175

积分

渐入佳境

贡献
5 点
金币
34 个
发表于 2023-2-13 09:58:51 | 显示全部楼层 |阅读模式
  1. if ( count( $_GET[ 'attachnew' ] ) > 0 && $this->_hasimg( $_GET[ 'attachnew' ] ) ) {
复制代码


要兼容PHP8的话 如下更改 是否合理 请高手指教

  1. if ( (is_array($_GET['attachnew']) && count($_GET['attachnew']) > 0)&& $this->_hasimg($_GET['attachnew']) ){
复制代码
1 贡献+5 金币

最佳答案

  1. if (isset($_GET['attachnew']) && is_array($_GET['attachnew']) && count($_GET['attachnew']) > 0 && $this->_hasimg($_GET['attachnew'])){
复制代码
回复

使用道具 举报

17

主题

570

回帖

1818

积分

应用开发者

贡献
63 点
金币
902 个
QQ
发表于 2023-2-13 10:19:06 | 显示全部楼层
  1. if (isset($_GET['attachnew']) && is_array($_GET['attachnew']) && count($_GET['attachnew']) > 0 && $this->_hasimg($_GET['attachnew'])){
复制代码
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-17 17:47 , Processed in 0.035101 second(s), 7 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2024 Discuz! Team.

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