0Logo WordpressFijo: Errores de PHP en desuso en panel de WordPress

El día de hoy he actualizado nuestro sitio de prueba, in preparation for rolling updates out to the main site. This involved updating several plugins and replacing theBeforeTheDeadlineplugin with Jetpack. After completing the updates I found I was getting several error messages on the dashboard, under the “Enlaces entrantes” dashboard widget, e incluso más errores cuando intenté vaciar los caches W3 Total Cache.

El error más común era la siguiente o similar a continuación (el cual fue el error que se muestra en el salpicadero)

Obsoleto: Assigning the return value of new by reference is deprecated in …/wp-includes/class-simplepie.php

Yo era capaz de borrar los errores desactivando todos los plugins, y volver a habilitar 1 at a time to lead me to the culpritan update to theWP Auto Affiliate Linksplugin we use to insert links to amazon for some products. A bit more research and a comparison of the code between the old plugin and new version led me to a fix fairly swiftlythe plugin contains some code near the top which turns on PHP errores.

[php]error_reporting(E_ALL & ~E_NOTICE);[/php]

La eliminación de esta línea (o comentarlo) resuelto completamente el problema.

As a further notethese warnings from PHP are normal for anyone running wordpress on an up-to-date PHP5 because wordpress includes lots of legacy code which uses functions which are now deprecated. The reason they aren’t normally shown is because non fatal errors are usually suppressed. It’s high time wordpress updated this legacy code, but that is a discussion for another time. Mientras tanto – if you start to get these errors after a plugin update you need to check the plugin code and edit out any lines that include the error_reporting() llamada a la función.

In the process of resolving this issue I also discovered something else quite useful. When I wanted to obtain the previous version of the auto affiliate links plugin I discovered that these are all archived on the wordpress.org downloads page. The current version (en el momento de la escritura) es 2.3.2 que se puede descargar de http://downloads.wordpress.org/plugin/wp-auto-affiliate-links.2.3.2.zip. My previous version was 2.2.2 – so I guessed the download link would be http://downloads.wordpress.org/plugin/wp-auto-affiliate-links.2.2.2.zip if old versions were retained. Hey prestousing that address worked perfectly, felicitaciones a WordPress para mantener versiones antiguas.

Tienes algunos pensamientos de su propio? Sumérjase a continuación comentando! Si desea suscribirse por favor utilice el enlace de suscripción en el menú en la parte superior derecha. También puede compartir esto con tus amigos mediante el uso de los enlaces sociales inferiores. Aclamaciones.

Deja una respuesta