Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey ETMSOFT,

    Thanks for reporting this! I’ll make sure it’s updated in a near future release.

    Thanks,

    Gerroald

    Hi,
    this is still present in the current version.
    Any chance to get rid of it?

    Thanks
    Ben

    Probably not without any additional info …

    First of all I think the line number has changed from 216 to 220.

    And is this occurring in frontend or backend (or both) ?
    What are the exact steps to reproduce this ?
    Are we talking about a single occurrence of the notice or is it repeated a number of times (with or without variations)?
    It would be interesting to post a screenshot of the notice clearly displaying it on screen.

    I think we are missing an important piece of the puzzle because in a vanilla WP env with the latest iTSec plugin installed I’m unable to reproduce the notice.

    I suspect the notice is generated on execution of the following code line:

    $jquery_ver = $wp_scripts->registered[‘jquery’]->ver;

    In a standard WP env the jquery.js script is registered by WP. The notice would seem to indicate that this is not the case in your WordPress env …
    Possibly because of another plugin or theme …

    So instead of pointing a vinger towards the iTSec plugin there may be something non standard in your WP env that needs to be investigated …

    Just some thoughts that might help to get to the bottom of this.

    dwinden

    Hello,
    I also got this notice when wp_debug was enabled.

    dwinden, you are correct, the line number has changed to 220.

    The theme I used had wp_deregister_script('jquery') in it’s functions.php file. That was why $wp_scripts->registered['jquery'] was not an object.

    I changed line 220 to:

    if ( is_object ( $wp_scripts->registered['jquery'] ) ) {
    	$jquery_ver = $wp_scripts->registered['jquery']->ver;
    } else {
    	$jquery_ver = null;
    }

    This got rid of the notice. Themes deregistering jquery is probably not good practice, but with this check you can avoid the notice when using such themes.

    p.s. sorry if there are formatting errors. Just created this account to post this.

    Edit: This actually gave me another notice (undefined index jquery). What I use now:

    if ( isset ( $wp_scripts->registered['jquery'] ) && is_object ( $wp_scripts->registered['jquery'] ) ) {
    	$jquery_ver = $wp_scripts->registered['jquery']->ver;
    } else {
    	$jquery_ver = null;
    }

    Thank you very much for this excellent feedback.

    dwinden

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Notice in Debug mode’ is closed to new replies.