Custom Press error on query.php

Hi,

I get an error message on the front after activation of debug mode

Notice: Trying to get property of non-object in /wp-includes/query.php on line 4529 Notice: Trying to get property of non-object in /wp-includes/query.php on line 4531 Notice: Trying to get property of non-object in/wp-includes/query.php on line 4533

These errors messages disappeared when deactivating custom press

Could you help me to correct this ?

Thanks

  • Cedric

    Hello Predrag

    Thanks for answer
    After updating to 4.7 notices are still there with a bit difference

    Notice: Trying to get property of non-object in /wp-includes/class-wp-query.php on line 3750 Notice: Trying to get property of non-object in /wp-includes/class-wp-query.php on line 3752 Notice: Trying to get property of non-object in /wp-includes/class-wp-query.php on line 3754

    I've changed the theme used with twenty seventeen and notices disappeared
    Seems to be a problem between my theme and custom press

  • Dimitris

    Hey there Cedric,

    hope you're doing good and don't mind chiming in!

    I'm really glad that you've managed to narrow this down.
    Is this a premium theme that you're using?
    Have you had a chance to inform its author(s) about this notice message?

    Despite that, this "notice" type of error indicates that there wasn't any operation that had been halted. This is happening for "parse errors" and "fatal errors" only, while "warnings" may cause a script to stop depending the issue.
    Are you experiencing any issues at all with CustomPress or other aspects of your website?

    To remove all error messages from screen and log them into a file, you can edit wp-config.php file and use the following piece of code just above the /* That's all, stop editing! Happy blogging. */ comment)

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors', 0);

    Warm regards,
    Dimitris