wpmudev plugins and php 7 ONLY

hi folks,

so - i'm thinking of chucking the older versions of php off my server.

if i only run php 7... will wordpress itself cope?
will wpmudev plugins & themes all be happy and quick?

Thanks!

  • Ivan Shulev
    • The Bug Hunter

    Hey Symi ,

    I hope you are having a nice day so far!

    will wordpress itself cope?

    It appears the developers have been working hard to make it ready for PHP7 and it should be ready for the most part - https://make.wordpress.org/core/2015/09/10/wordpress-and-php7/

    will wpmudev plugins & themes all be happy and quick?

    If there are no errors, they will be quite faster :slight_smile: This will be due to the improvements that PHP7 brings. However, we are aware of a few incompatibilities between our plugins and PHP7 (yesterday I encountered one with Marketpress, for which the fix was extremely simple, but still there).

    I would encourage you to test, if you feel like moving forward and see how far you will go :slight_smile: If there are issues, report them to us and we will dig in and try to fix them. PHP7 is the future and sooner or later we need to be ready for it.

    I hope this helps and I wish you an awesome day ahead!

    Ivan

  • Symi
    • The Crimson Coder

    Whoohooo! So far so good - all the plugins on blank wordpress installs have gone really great so far.
    i've done a few restores (sorry guys, via updraftplus), and though the site comes up perfectly in the blank state, the moment i do the restore, it gives me a 500 server error.'

    there's a difference in php and in sql versions, i suspect, from server 1 to server 2.

    bit of a disappointment.

    any ideas?

  • Symi
    • The Crimson Coder

    yayy!!

    here we go:

    [28-Apr-2016 18:58:02 UTC] PHP Notice:
    The called constructor method for WP_Widget in MarketPress_Product_Search_Widget is deprecated since version 4.3.0!
    Use

    __construct()
    instead. in /home/username/public_html/wp-includes/functions.php on line 3722

    [28-Apr-2016 18:58:02 UTC] PHP Notice: The called constructor method for WP_Widget in AgmMapsWidget is deprecated since version 4.3.0! Use

    __construct()
    instead. in /home/username/public_html/wp-includes/functions.php on line 3722

    [28-Apr-2016 18:58:02 UTC] PHP Notice: The called constructor method for WP_Widget in MarketPress_Product_Search_Widget is deprecated since version 4.3.0! Use

    __construct()
    instead. in /home/username/public_html/wp-includes/functions.php on line 3722

    [28-Apr-2016 18:58:02 UTC] PHP Fatal error: 'continue' not in the 'loop' or 'switch' context in /home/username/public_html/wp-content/plugins/marketpress/includes/common/payment-gateways/payfast.php on line 180

    [28-Apr-2016 18:58:09 UTC] PHP Notice: The called constructor method for WP_Widget in MarketPress_Product_Search_Widget is deprecated since version 4.3.0! Use

    __construct()
    instead. in /home/username/public_html/wp-includes/functions.php on line 3722

    [28-Apr-2016 18:58:09 UTC] PHP Notice: The called constructor method for WP_Widget in AgmMapsWidget is deprecated since version 4.3.0! Use

    __construct()
    instead. in /home/username/public_html/wp-includes/functions.php on line 3722

    [28-Apr-2016 18:58:09 UTC] PHP Notice: The called constructor method for WP_Widget in MarketPress_Product_Search_Widget is deprecated since version 4.3.0! Use

    __construct()
    instead. in /home/username/public_html/wp-includes/functions.php on line 3722
    [28-Apr-2016 18:58:09 UTC] PHP Fatal error: 'continue' not in the 'loop' or 'switch' context in /home/username/public_html/wp-content/plugins/marketpress/includes/common/payment-gateways/payfast.php on line 180

  • Symi
    • The Crimson Coder

    Hey Ivan, thanks so much for responding!

    Uhm, I'm a bit unsure of what line 180 is...
    here's the surrounding code?

    $selected_cart = $global_cart;
    $settings = get_site_option('mp_network_settings');

    //loop through cart items
    if (!is_array($cart) || count($cart) == 0) {
    continue;
    }
    $totals = array();

    What am i commenting out?
    codelobster suspects thatline 180 is the continue; phrase. that it?

  • Luís
    • Support

    Hi Symi ,

    Hope you're doing well today!

    As my teammate Ivan Shulev mentioned, around the line 180 you will find:

    if (!is_array($cart) || count($cart) == 0) {
           continue;
    }

    You should comment the "continue" statement and change the code to:

    if (!is_array($cart) || count($cart) == 0) {
          // continue;
    }

    I hope this information has been helpful. If I can help you in this or other questions, please let me know!

    Cheers, Luís

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.