Fatal error str_contains()

Support MB Blocks Fatal error str_contains()

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46547
    YumikomYumikom
    Participant

    Hi,

    It seems that MBBlocks has updated itself, and many PHP7-based servers cannot use str_contains(), which causes a Fatal error and prevents posting on the site.

    We would like to perform PHP upgrades on servers in a planned manner, so we need to coordinate with our clients.

    Is it possible to have backward compatibility?

    I have noticed something about this issue.
    In recent years, we have been having problems with Metabox version upgrades breaking site functionality and we do not use automatic updates.
    We manually check the version up to make sure it works and then update the live site.

    It seems that extended MB-based plugins other than Metabox itself are being auto-updated, why?
    MB itself is 5.6.18 and MBBlocks 1.7.2 on the site where this error occurs
    Please let me know as soon as there is a way to stop the auto-update.
    I can't even use the rollback plugin and am having a very difficult time.

    Best regards,
    Yumiko

    #46549
    YumikomYumikom
    Participant

    Hi,

    I looked up the compatibility behavior in PHP7 and found Symphony's polyfill.
    https://github.com/symfony/polyfill

    I was able to load this in wp-config and get it to work successfully.
    WordPress core also uses str_contains() etc., but polyfill is provided.

    It would be helpful if the plugin could be complemented with polyfill when using PHP8 functions.
    Is it possible that the problem is that the Metabox itself is still out of date and only the MB extension has been upgraded?

    #46564
    PeterPeter
    Moderator

    Hello Yumiko,

    What is the PHP version on your server? Please use PHP 7.4 and see if it helps. If you want to disable auto updates, please follow the documentation https://www.wpbeginner.com/wp-tutorials/how-to-disable-automatic-updates-in-wordpress/

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.