当前位置:网站首页>解决Deprecated: Methods with the same name as their class will not be constructors in报错方案
解决Deprecated: Methods with the same name as their class will not be constructors in报错方案
2022-06-24 09:40:00 【徊忆羽菲】
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP
报错

( ! ) Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Services_JSON_Error has a deprecated constructor in D:\wamp\www\kindeditor\JSON.php on line 795
解决方案
通过查看PHP官网的文档发现,php7.0之后将不再支持与类名相同的构造方法,构造方法统一使用 __construct()。
查找代码:D:\wamp\www\kindeditor\JSON.php on line 第795 行
原文件
class Services_JSON_Error
{
function Services_JSON_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
}
}
改为
class Services_JSON_Error
{
function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
}
}

将 function Services_JSON_Error 改为 function __construct
边栏推荐
- YOLOv6:又快又准的目标检测框架开源啦
- NVIDIA's CVPR 2022 oral is on fire! 2D images become realistic 3D objects in seconds! Here comes the virtual jazz band!
- Recursive traversal of 414 binary tree
- [db2] sql0805n solution and thinking
- 编程题(持续更新)
- [custom endpoint and implementation principle]
- Queue queue
- dedecms模板文件讲解以及首页标签替换
- 上升的气泡canvas破碎动画js特效
- Honeypot 2 hfish, ehoney
猜你喜欢

Ora-28000 error after upgrading Oracle 12C to 19C

顶刊TPAMI 2022!基于不同数据模态的行为识别:最新综述

How large and medium-sized enterprises build their own monitoring system

411-栈和队列(20. 有效的括号、1047. 删除字符串中的所有相邻重复项、150. 逆波兰表达式求值、239. 滑动窗口最大值、347. 前 K 个高频元素)

美国电子烟巨头 Juul 遭遇灭顶之灾,所有产品强制下架

How does home office manage the data center network infrastructure?

二叉树第一部分

植物生长h5动画js特效

SVG+js拖拽滑块圆形进度条

oracle池式连接请求超时问题排查步骤
随机推荐
上升的气泡canvas破碎动画js特效
SVG+js拖拽滑块圆形进度条
How to standardize data center infrastructure management process
Endgame P.O.O
读取csv(tsv)文件出错
port 22: Connection refused
MySQL data advanced
How to solve multi-channel customer communication problems in independent stations? This cross-border e-commerce plug-in must be known!
Open Oracle server under Linux to allow remote connection
植物生长h5动画js特效
二叉树第一部分
时尚的弹出模态登录注册窗口
SQL Server AVG函数取整问题
2021-08-17
Development of anti fleeing marketing software for health products
机器学习——感知机及K近邻
Programming questions (continuously updated)
买的长期理财产品,可以转短吗?
SQL-统计连续N天登陆的用户
nVisual数字基础设施运营管理软件平台