Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1382957

    az
    Participant

    I would like to upgrade to php 7 as it’s much faster etc.

    My host (WP Engine) recommended the upgrade and offered a plugin to test site compatibility with PHP 7.

    All my plugins & themes are compatible apart of cornerstone, the errors in specific are with preg_replace() as shown here: https://snag.gy/tPxIo2.jpg

    Can we expect an update anytime soon?

    #1383030

    Darshana
    Moderator

    Hi there,

    Thank you for submitting this issue. I have forwarded this to our development team for further review.

    Thanks!

    #1385361

    davidleefish
    Participant

    Same issue. Here are the errors I get with the php 7 compatibility checker for Cronerstone:

    FILE: /nas/content/live/gb2017/wp-content/plugins/cornerstone/includes/utility/jsqueeze.php
    ————————————————————————————————–
    FOUND 3 ERRORS AFFECTING 3 LINES
    ————————————————————————————————–
    387 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    465 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    480 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    ————————————————————————————————–

    #1385625

    Rad
    Moderator

    Hi there,

    Their compatibility checker isn’t accurate, they doesn’t really check the compatibility. They only check the existence of certain string.

    From that jsqueeze.php file

    Line 387 : $code = preg_replace("'(?<![\$.a-zA-Z0-9_])while\('", '3#(', $code);
    Line 465 : $f = preg_replace("'(?<![\$.a-zA-Z0-9_])else\n'", "\n", $f);
    Line 480 : $f = preg_replace("'(?<![a-zA-Z0-9_\$])for\neach\('", 'for each(', $f);

    As you’ll notice, the compatibility tester doesn’t check if it’s really a /e modifier ( http://php.net/manual/en/function.preg-replace.php Errors/Exceptions ). It only checks the existence of letter e from preg_replace() regex string.

    Thanks.

    #1387341

    Alexander
    Keymaster

    Hi everyone,

    I’ve reported this to the plugin developers on wordpress.org

    https://wordpress.org/support/topic/false-positive-preg_replace-e-modifier/

    Hopefully they can make an update to address this soon.

    #1415559

    bttrym8
    Participant

    Are these similar errors to the above? As in are they false positives:

    Slider Revolution:
    458 | ERROR | ‘clone’ is a reserved keyword introduced in PHP version 5.0 and cannot be invoked as a function (T_CLONE)

    The Grid:
    86 | ERROR | Visibility for magic method __sleep must be public. Found: private

    Envira
    2246 | WARNING | INI directive ‘safe_mode’ is deprecated since PHP 5.3 and removed since PHP 5.4.
    2323 | WARNING | INI directive ‘safe_mode’ is deprecated since PHP 5.3 and removed since PHP 5.4.

    #1416255

    Christian
    Moderator

    No, they are not the same. We’ll forward this to the specified plugins for investigation. Please stay tuned.

    Thanks.

    #1416259

    bttrym8
    Participant

    Much appreciated Christian! I’m chomping at the bit to go PHP 7, and multiple people on the X theme users FB have said they’ve done it with the same errors. But the process for downgrading PHP if it doesn’t work isn’t the simplest.

    #1416528

    cudafunk
    Participant

    Has anyone made the switch to php 7 to see if it causes any issues?

    #1416534

    bttrym8
    Participant

    I’ve seen people in the FB group switch, but none with my same set of plugins as above

    #1417120

    Rad
    Moderator

    Hi there,

    PHP 7 could surely cause troubles to some plugins and all we could do for now is forward it to each respective author/developer. But as by checking with cornerstone, there should be no issues, at least on my test.

    Thanks!

    #1422223

    nielsteunis
    Participant

    I have tried to upgrade to PHP7 and it caused major problems for me. I use Siteground, which I think is a solid host. I have to say that I find it more than disappointing that this hasn’t been addressed yet. This issue has been raised since the Fall of last year. I am now going to switch to another theme, one that allows me to upgrade to the newer, faster and safer version of PHP7.

    #1422911

    Joao
    Moderator

    We certainly appreciate the feedback! Our developers are working on it.

    We are sorry to hear you go. We have plenty of good reports of X working Well with PHP 7, but it is still not 100% supported.

    Thanks for understanding,

    Joao