Q&A: Undefined index: maskanswers_per_page

Hello WPMU DEV,
An awesome new year to you all!

In debug mode I get the following notice:

Notice: Undefined index: maskanswers_per_page in /wp-content/plugins/qa/core/core.php on line 14

Looking at a couple other posts about undefined indexes, I understand that notices can be ignored, but does it make sense to report it?

  • Axel

    Hi Ari,

    I have a couple more:

    Multisite Privacy
    PHP Notice: Undefined index: HTTP_USER_AGENT in .../sitewide-privacy-options/sitewide-privacy-options.php on line 147
    PHP Notice: Undefined index: HTTP_USER_AGENT in .../sitewide-privacy-options/sitewide-privacy-options.php on line 151
    PHP Notice: Undefined index: HTTP_USER_AGENT in .../sitewide-privacy-options/sitewide-privacy-options.php on line 155
    PHP Notice: Undefined index: HTTP_USER_AGENT in .../sitewide-privacy-options/sitewide-privacy-options.php on line 159
    PHP Notice: Undefined index: HTTP_USER_AGENT in .../sitewide-privacy-options/sitewide-privacy-options.php on line 163

    Affiliate
    PHP Notice: Trying to get property of non-object in .../affiliate/affiliateincludes/classes/affiliateshortcodes.php on line 103
    PHP Notice: Trying to get property of non-object in .../affiliate/affiliateincludes/classes/affiliateshortcodes.php on line 113

    I hope this helps!

  • Axel

    Hi Ari,

    I got this from the log in debug mode.

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true );

    @ wp-config.php

    I did not see it on screen before, but had define('WP_DEBUG_DISPLAY', false ); at the time, so I'm not sure what action triggered it.

    Perhaps (?) it helps to know that these errors came right before (and right after most of the time):

    PHP Notice:  Trying to get property of non-object in .../wp-includes/query.php on line 4349
    PHP Notice:  Trying to get property of non-object in .../wp-includes/query.php on line 4351
    PHP Notice:  Trying to get property of non-object in .../wp-includes/query.php on line 4353

    Grtz!

  • Ash

    Hello @Axel

    I hope you are well today.

    These are all notices. You can ignore notices as these are helpful for developers but not harmful for your website. You can simply turn off debug mode by settings WP_DEBUG to false in wp-config.php file.

    Though I believe all notices should be resolved and our developers are working on that. Whenever we see a notice is produced, we solve it.

    But if you are worried about the functionality, please do not. You can just disable debug mode and everything will work fine :slight_smile:

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.