Multiple PHP Notices Being Displayed

As a long standing user of WordPress as well as a developer, designer, and WPTRT admin I tend to leave WP_DEBUG set to "true" ... set and forget it for the most part. This generally does not cause any significant issues for most themes and plugins but is nice to do when reviewing a plugin or theme before putting it into a production environment. That being the case, I just downloaded Marketpress earlier today as I have an interesting project that it may be an ideal fit for, but ...

... the following PHP "notices" appear several times (instead of the duplicates I will just list each unique notice):

Notice: Undefined index: allowed in ../wp-content/plugins/marketpress/marketpress.php on line 507
Notice: Trying to get property of non-object in ../wp-content/plugins/marketpress/marketpress.php on line 1554
Notice: Trying to get property of non-object in ../wp-content/plugins/marketpress/marketpress.php on line 1558
Notice: Undefined index: taxonomy in ../wp-content/plugins/marketpress/marketpress.php on line 1085
Notice: Undefined variable: store_object in ../wp-content/plugins/marketpress/marketpress.php on line 1356

There may be more, but (IMHO) there should be zero notices regardless of any other criteria.

/** ---- */
Some additional details from my BNS Support plugin:
WordPress Version: 3.4-beta4-20825
PHP version: 5.2.17
Multisite Enabled: False
Theme: Twenty Ten v1.3
Current User Role: administrator
Active Plugins:

BNS Corner Logo 1.6
by Edward Caissie (url)
BNS Early Adopter 0.4
by Edward Caissie (url)
BNS Featured Category 2.1
by Edward Caissie (url)
BNS Featured Tag 1.9.2
by Edward Caissie (url)
BNS Inline Asides 0.6.2
by Edward Caissie (url)
BNS Login 1.8
by Edward Caissie (url)
BNS Support 1.1.1
by Edward Caissie (url)
Log Deprecated Notices 0.2
by Andrew Nacin (url)
MarketPress 2.5.9
by Aaron Edwards (Incsub) (url)
Plugin-Check 0.1
by Pross (url)
Theme-Check 20110805.1
by Pross (url)
WordPress Importer 0.6
by wordpressdotorg (url)

  • aecnu

    Greetings cais,

    Welcome to WPMU Dev!

    Thank you for your feedback, it is greatly appreciated.

    How far along configuring Market Press have you gotten?

    I am making note that we only support production versions of WordPress which to date is version 3.3.2 which is also displayed as the version the plugin is compatible with.

    Your reported version WordPress that you are trying to run Market Press on is 3.4-beta4-20825

    However, I will certainly see about getting the lead developer of the Market Press plugin in here for his comments and invaluable insight into why you may be seeing any warnings.

    Though this may take longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • cais

    @aecnu and @Shawn - Thank you for the responses.

    As far as set up is concerned, I looked at this on a local install as well as an online install with similar issues. I created a product in the local (which was very difficult prior to turning off WP_DEBUG, which IMHO should not be a necessity to test a current stable version) ... no apparent differences where found; beyond that I have not looked at any additional settings.

    @aecnu - Version 3.4-beta4-x is quite stable, and a cursory look at the plugin code did not indicate any significant item that would be affected.

    @Shawn - I did have a quick look at the code around line 507 to see it is "gateway" related, but again, as far as I am concerned this should not displaying notices as I would expect there are use-cases where this plugin may be used and a payment gateway would not be required. Given that idea, this particular notice may need to be addressed with a greater priority than the others ones noted.

  • Shawn

    The error is that the array element doesn't exist - because it hasn't been configured. Even if you have no need for a payment gateway, if the options array hasn't been populated because it isn't stored in the db, then it's going to return an error. The "allowed" parameter can be set to false for all of them - but would still need to be 'saved' in the configuration in order to populate that value.

    It would be best if this option was tested during initial installation and subsequent updates, and pre-populated with the defaults if the value isn't found. But even so, the fix seems simple enough (save the settings page).

  • cais

    @Shawn - I agree that all of the "options" should be tested "during initial installation"; using the "Save Changes" button on the sixth(!) tab to correct the (most prevalent) PHP notice issue should be addressed.

    I'll keep looking at the plugin, but this issue and others did send up flags all the same; I'll leave it for the developer to sort out how they best want to correct them rather than expecting end-users to find the "Save Changes" work-around ...

  • aecnu

    Greetings cais,

    Once again thank you for your feedback.

    Please keep in mind that I have indeed asked the lead developer to come in here and give his opinion on the reported warnings issue.

    I do not have a problem with nor try to indicate that Version 3.4-beta4-x is not stable, what I am saying is we do not support it.

    Normally and from my experience as just a regular member of WPMU Dev, when the next production version comes out, all WPMU Dev plugins and themes are updated to be compatible with that version at the time of the release.

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.