解决Deprecated:Methodswiththesamenameastheirclasswillnotbeconstructorsin报错方案

标签:
php |
分类: WEB开发 |
解决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 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 行
原文件
改为
将 function Services_JSON_Error 改为 function __construct
————————————————
原文链接:https://blog.csdn.net/guo_qiangqiang/article/details/124929721