• A check for compatibility with PHP 7.0 using the “PHP Compatibility Checker” plugin,
    reports the following errors and warnings.

    FILE: /home/sitename/public_html/wp-content/plugins/category-posts-in-custom-menu/cpcm-functions52.php
    ——————————————————————————————————
    FOUND 4 ERRORS AFFECTING 4 LINES
    ——————————————————————————————————
    26 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    31 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    38 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    43 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    ——————————————————————————————————

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi MKSnMKS,

    thank you kindly for the message. I appreciate you reaching out.

    Please note that the functions you see are for PHP 5.2 and below. The file cpcm-functions52 is for backwards compatibility. (Yeah, maybe I can just drop the PHP < 5.2 support altogether, but I’m not so sure who uses it…)

    So, it won’t cause trouble for PHP 7 ??

    Anyway, thank you for taking the time to report this!

    Kind regards,
    Diana

    Thread Starter MKSnMKS

    (@mksnmks)

    Hi Diana Koenraadt (@anaid),

    Thanks for replying, and sorry for not getting back to you sooner.
    backwards compatibility is a good thing (as I see it).
    The other way of seeing it is that forwards compatibility, is good so one knows they can advance to newer systems.
    Either way – this is good.

    It’s good that you have a separate file for PHP5.2 .

    I am not sure if there is a standard way for WP plugins to structure their files so that it is possible to automatically figure out which PHP version it is for.
    I see that you file name has 52 appended on the right end of the name.
    This is sensible and obvious, but is it a standard or convention?
    If it is not a convention, and if there is no convention, then it would be handy for WP to have such a similar convention.
    This would help PHP compatibility checker to know whether it is checking a relevant file for the PHP version it is checking.
    It would also be possible for users to choose which PHP versions they would like their plugins to be compatible with. This means they could delete the ones they do not need. It also means they would be able to control the ones they do need, especially when wanting to upgrade, while keeping the option to revert back to earlier PHP versions.

    I did a scan a few days back and the same problem exists.
    I’ll send a link to this Topic to the PHP Compatibility Checker plugin, so they can add this false detection to their list.

    Thank you for your help.
    I’d be interested to know your thoughts on the convention/standard system above?

    Hi MSnMKS,

    I don’t think I’m in a position to say anything about a convention/standard. Simply not for me to decide.

    I’d recommend you open a ticket here: https://core.trac.www.remarpro.com

    Kind regards,
    Diana

    Thread Starter MKSnMKS

    (@mksnmks)

    Hi Diana Koenraadt (@anaid),

    You are unaware of a convention?
    Do think a convention would be useful?
    Feel free to comment on the thoughts above.
    I am thinking about making a suggestion for some sort of convention.

    Thanks for any input.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP7 Compatibility – possible issues to be fixed’ is closed to new replies.