• Resolved gduroy

    (@gduroy)


    Hi guys,
    I have to admit that your plugin seems awesome (considering the tests i did on local) but it’s causing a lot of PHP errors when i try to activate it on PROD:

    Here is the error i got while trying to activate the plugin :

    Warning: Invalid argument supplied for foreach() in …/wp-content/plugins/sunshine-photo-cart/addons/addon-manager/class-tgm-plugin-activation.php on line 2129

    Warning: Cannot modify header information – headers already sent by (output started at …/wp-content/plugins/sunshine-photo-cart/addons/addon-manager/class-tgm-plugin-activation.php:2129) in …/wp-includes/pluggable.php on line 1174

    And when activated, here is the warning i got on every page of the administration :

    Warning: Invalid argument supplied for foreach() in …/wp-content/plugins/sunshine-photo-cart/addons/addon-manager/class-tgm-plugin-activation.php on line 2129

    I’m using the theme LifeStyle and the plugins : Google Analytics for WordPress, Contact Form 7 and Master Slider.

    Any idea of the reason of this warning ?

    Any help would be much appreciated ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @gduroy,

    I’ve had a quick look and this is not an issue with the Sunshine Photo Cart plugin, but with your theme Lifestyle.

    They are calling an external library used by both the plugin as well as the theme without the right arguments ($plugins variable has not been defined) and they should really fix this. /cc @themehit
    While they are at it, as they don’t currently use the external library, they should either remove it and any code pointing to it òr, if they do intend to use it, upgrade the version they include to the latest version (2.6.1).

    In the mean time, you can solve the issue yourself:
    * Open up the wp-themes/lifestyle/functions.php file
    * Change line 161 from:
    add_action( 'tgmpa_register', 'lifestyle_register_plugins' );
    to
    // add_action( 'tgmpa_register', 'lifestyle_register_plugins' );
    * Save the file (and if needed upload it to your server)

    Hope this helps!

    Smile,
    Juliette

    Thread Starter gduroy

    (@gduroy)

    Works like a charm !
    Thanks a lot.
    I’ll notify the developers of the theme then ??
    Thanks a lot for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP errors’ is closed to new replies.