当前位置:网站首页>解决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
边栏推荐
- 2021-08-17
- Get the QR code of wechat applet with parameters - and share the source code of modifying the QR code logo
- GeoGebra 实例 时钟
- Network of test and development - Common Service Protocols
- Distributed | how to make "secret calls" with dble
- canvas无限扫描js特效代码
- Desktop software development framework reward
- Queue queue
- [Eureka registry]
- 居家办公如何管理数据中心网络基础设施?
猜你喜欢

Cookie encryption 4 RPC method determines cookie encryption

小程序学习之获取用户信息(getUserProfile and getUserInfo)

二叉树第一部分

Producer / consumer model

如何提高网络基础设施排障效率,告别数据断档?

YOLOv6:又快又准的目标检测框架开源啦

Groovy obtains Jenkins credentials through withcredentials

NVIDIA's CVPR 2022 oral is on fire! 2D images become realistic 3D objects in seconds! Here comes the virtual jazz band!

Use of vim

微信小程序学习之 实现列表渲染和条件渲染.
随机推荐
Amendment to VPP implementation policy routing
如何提高网络基础设施排障效率,告别数据断档?
p5.js实现的炫酷交互式动画js特效
GeoGebra 实例 时钟
indexedDB本地存储,首页优化
Nvisual digital infrastructure operation management software platform
Wechat applet learning to achieve list rendering and conditional rendering
Basic operations on binary tree
Groovy obtains Jenkins credentials through withcredentials
物联网?快来看 Arduino 上云啦
Mise en œuvre du rendu de liste et du rendu conditionnel pour l'apprentissage des applets Wechat.
Thinkphp5 multi language switching project practice
Ora-28000 error after upgrading Oracle 12C to 19C
CVPR 2022 Oral | 英伟达提出自适应token的高效视觉Transformer网络A-ViT,不重要的token可以提前停止计算
canvas管道动画js特效
Internet of things? Come and see Arduino on the cloud
微信小程序學習之 實現列錶渲染和條件渲染.
Observer mode
Five heart matchmaker
Honeypot 2 hfish, ehoney