admin管理员组文章数量:1794759
php7.4报错:Trying to access array offset on value of type null
- 一、说明
- 二、原因
- 三、解决
- 1、原代码
- 2、修改后
- 报错原因:访问类型为 null 的值的 数组下标
- 7.2中是没问题的,7.4中对语法规范性更为严谨
- 原文:Trying to use values of type null, bool, int, float or resource as an array (such as $null["key"]) will now generate a notice.
- 翻译:尝试将 null,bool,int,float 或 resource 类型的值用作数组 ( 例如 $null[“key”] ) 会产生一个通知。
- 传送门:www.php/manual/en/migration74.incompatible.php,截图如下:
版权声明:本文标题:php7.4报错:Trying to access array offset on value of type null 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686959832a122408.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论