• Resolved grex22

    (@grex22)


    When trying to activate this plugin on PHP 7.2, I’m getting the following fatal error:

    Fatal error: Uncaught Error: Call to undefined function SiteGround_Migrator\Helper\str_starts_with() in /home/mysite/public_html/wp-content/plugins/siteground-migrator/core/Helper/Helper.php:166

    The function it references (str_starts_with()) wasn’t introduced until PHP 8. Yet the plugin’s required PHP version actually says +5.6

    PHP’s docs on this function: https://www.php.net/manual/en/function.str-starts-with.php

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Simeon Boev

    (@k3llanved)

    Hello @grex22 ,

    I wasn’t able to recreate the issue on my end using a fresh WordPress and PHP 7.2, however, I will ask our developers to take a look at the case and update the minimum PHP version needed to use the plugin if needed. Regarding the fatal error on your website, I strongly recommend using PHP version 8.0 or above if possible, this will allow you to run the plugin and migrate the content. Placing the website under maintenance and disabling all other plugins to ensure the successful migration Is something I would suggest as well.

    Best Regards,

    Simeon Boev

    • This reply was modified 2 years, 1 month ago by Simeon Boev.
    Thread Starter grex22

    (@grex22)

    Thanks for checking on this Simeon! I agree generally we should all be running PHP 8, but especially in the case of a site migrator plugin, our old hosts may not fully support it yet. But good recommendations of course, generally!

    It’s possible that the function in question only gets called on plugin activation? Or some other condition? Because str_starts_with() is very clearly added to the plugin as of two days ago (most recent version 2.0.6), and that function exists only in PHP 8+

    Since the plugin was updated so recently, is it possible you were checking on 2.0.5?

    I worry that folks that auto-update your plugins on hosting with PHP 7.4 or below are going to experience site outages.

    Plugin Author Elena Chavdarova

    (@elenachavdarova)

    Thank you for your report, @grex22!
    We will release new version today with a fix for PHP versions lower than 8.0.
    Best Regards,
    Elena

    Thread Starter grex22

    (@grex22)

    Awesome!! Thanks Elena! I use the plugin quite a bit, so am happy to assist

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal Error on Activation (uses PHP 8 Function, but 5.6 required)’ is closed to new replies.