Getting deprecated error with Simplepie

痴心易碎 提交于 2019-11-29 15:40:40

This is a result of SimplePie's PHP 4 compatibility and is nothing in your code. If you want to stop seeing these errors, exclude E_DEPRECATED from your error_reporting:

error_reporting(E_ALL & ~E_DEPRECATED);

If you'd like to fix the errors themselves, you can grab a copy of SimplePie 1.3-dev (which drops PHP 4 compatibility) from GitHub, although keep in mind this is a development version and is unstable.

You need to find every instance of "=& new" in the code and delete the "&" which is now deprecated. There are approximately 116 occurrences in the code. It has to do with copies and references of object instantiation.

The only occurrence of error_reporting I could find in Version 1.2.1 was this line:

if ((ini_get('error_reporting') & $level) > 0)

This was in simplepie.inc

I'm still not sure how to disable all these warnings short of going with the dev version which I'd prefer not to as I have enough code to debug as is.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!