How to fix the problems reported with the Blackbox Debug plugin in Wordpress?

Asked

Viewed 345 times

1

I am facing several speed problems on my Wordpress site.
Seeking to identify causes, I added the plugin Blackbox Debug that identified 33.1 errors with the theme I use, which is well loaded.

I removed the theme and put a basic theme to see if it persisted and the following log below was reported, with still 12 errors:

Strict (259)    is_a(): Deprecated. Please use the instanceof operator on line 392 in file /home/meusite/public_html/wp-includes/post.php
Strict (11) is_a(): Deprecated. Please use the instanceof operator on line 498 in file /home/meusite/public_html/wp-includes/capabilities.php
Strict (3)  is_a(): Deprecated. Please use the instanceof operator on line 75 in file /home/meusite/public_html/wp-includes/functions.wp-scripts.php
Strict (2)  is_a(): Deprecated. Please use the instanceof operator on line 105 in file /home/meusite/public_html/wp-includes/functions.wp-styles.php
Strict (6)  is_a(): Deprecated. Please use the instanceof operator on line 160 in file /home/meusite/public_html/wp-includes/functions.wp-styles.php
Strict (12) is_a(): Deprecated. Please use the instanceof operator on line 197 in file /home/meusite/public_html/wp-includes/functions.wp-scripts.php
Strict  is_a(): Deprecated. Please use the instanceof operator on line 37 in file /home/meusite/public_html/wp-includes/functions.wp-styles.php
Strict  is_a(): Deprecated. Please use the instanceof operator on line 115 in file /home/meusite/public_html/wp-includes/functions.wp-scripts.php
Strict  is_a(): Deprecated. Please use the instanceof operator on line 812 in file /home/meusite/public_html/wp-includes/script-loader.php
Strict  is_a(): Deprecated. Please use the instanceof operator on line 729 in file /home/meusite/public_html/wp-includes/script-loader.php
Strict (101)    is_a(): Deprecated. Please use the instanceof operator on line 205 in file /home/meusite/public_html/wp-includes/class-wp-error.php
Notice (3)  Trying to get property of non-object on line 597 in file /home/meusite/public_html/wp-includes/nav-menu.php

What do these errors mean? How can I correct them?

  • Which version of PHP is installed on the server?

  • 1

    This question is not broad or unclear. I, who use Wordpress constantly, understand perfectly what the problem is. What’s more, the question has already been properly answered by @Math.

  • 1

    I agree that the question was made half-hearted at first, but I thought the decision to close it was hasty, no one who closed even added a comment asking the author to elaborate the question better.

2 answers

2


is_a() was retired in php 5.0 but was reintroduced in 5.3.

To solve your problem do a PHP update.

Reference: PHP Manual

  • 1

    Correct! Reference of the documentation here.

  • Good! lacked a reference.. I can add your suggestion to my reply?

  • Sure, make yourself at home!

  • Thank you very much, it was very simple and ,just an update and it was clean!!!

0

Therefore it is possible to verify in this error report, the substitution of the method is requested is_a() for instanceof, since the first one is obsolete (according to PHP 5 manual). For example:

Where featured

if (is_a($WF, 'WidgetFactory'))

I suggest putting

if ($WF instanceof WidgetFactory)

Probably with this change the amount of errors found will decrease to 1.

  • 3

    The function is_a() is no longer depreciated. Do not change the core of Wordpress because of this.

  • E.Homas used the answer from Math for being easier, but thanks anyway for having people who help the development community in Brazil,.

  • No problem @user5004. I am glad that I also learned to read the complete documentation, as I did not notice that the is_a() function was reactivated, cfe: 5.3.0 This Function is no longer deprecated, and will therefore no longer throw E_STRICT warnings. (Source [http://br1.php.net/manual/en/function.is-a.php])

Browser other questions tagged

You are not signed in. Login or sign up in order to post.