DIY میڈیا ہوم علامت

اپنے گھر تھیٹر اور ہائی فائی سیٹ اپ کے ڈیزائن اور پیدا کرنے کے لئے الٹی سائٹ.

0ورڈپریس علامتفکسڈ: Deprecated PHP errors in wordpress dashboard

Earli­er today I updated our test site, in pre­par­a­tion for rolling updates out to the main site. This involved updat­ing sev­er­al plu­gins and repla­cing the “BeforeTheDead­line” plu­gin with Jet­pack. After com­plet­ing the updates I found I was get­ting sev­er­al error mes­sages on the dash­board, under the “incom­ing links” dash­board wid­get, and even more errors when I tried to empty the W3 Total Cache caches.

The most com­mon error was as below or sim­il­ar to below (which was the error shown on the dashboard)

Deprec­ated: Assign­ing the return value of new by ref­er­ence is deprec­ated in …/wp-includes/class-simplepie.php

I was able to clear the errors by deac­tiv­at­ing all plu­gins, and re-enabling 1 at a time to lead me to the cul­prit — an update to the “WP Auto Affil­i­ate Links” plu­gin we use to insert links to amazon for some products. A bit more research and a com­par­is­on of the code between the old plu­gin and new ver­sion led me to a fix fairly swiftly — the plu­gin con­tains some code near the top which turns on پی ایچ پی غلطیاں.

error_reporting(E_ALL & ~E_NOTICE);

Remov­ing this line (or com­ment­ing it) com­pletely resolved the problem.

As a fur­ther note — these warn­ings from پی ایچ پی are nor­mal for any­one run­ning word­press on an up-to-date PHP5 because word­press includes lots of leg­acy code which uses func­tions which are now deprec­ated. The reas­on they aren’t nor­mally shown is because non fatal errors are usu­ally sup­pressed. It’s high time word­press updated this leg­acy code, but that is a dis­cus­sion for anoth­er time. In the mean­time — if you start to get these errors after a plu­gin update you need to check the plu­gin code and edit out any lines that include the error_reporting() func­tion call.

In the pro­cess of resolv­ing this issue I also dis­covered some­thing else quite use­ful. When I wanted to obtain the pre­vi­ous ver­sion of the auto affil­i­ate links plu­gin I dis­covered that these are all archived on the down­loads page. The cur­rent ver­sion (لکھنے کے وقت) ہے 2.3.2 which can be down­loaded from My pre­vi­ous ver­sion was 2.2.2 — so I guessed the down­load link would be if old ver­sions were retained. Hey presto — using that address worked per­fectly, kudos to word­press for keep­ing old versions.

آپ کیا سوچتے ہیں? ہمیں نیچے ایک تبصرہ چھوڑیں! آپ کے سبسکرائب کرنا چاہتے ہیں تو سب سے اوپر دائیں مینو پر لنک سبسکرائب استعمال کریں. آپ بھی ذیل سماجی روابط کا استعمال کرتے ہوئے کی طرف سے اپنے دوستوں کے ساتھ اس کا اشتراک کر سکتے ہیں. چیرس.

جواب چھوڑیں