Support » Plugin: Bulk Auto Image (.webp, .jpg, .png, ...) Alt Text (Alt tag, Alt attribute) optimization (SEO) » [Fatal Error] Has fatal error when access new post in admin

  • Resolved chienthuatxd


    Hi Team,
    I have a fatal error when upgrade latest version
    Parse error: syntax error, unexpected '?' in blog\wp-content\plugins\bulk-image-alt-text-with-yoast\core\Request.php on line 14

    My enviroment: PHP 5.6.37

    I checked your source code and see that: You used ‘??’ operator in Request.php
    return $request ?? false;
    And this operator from PHP 7.x or higher
    So please help me to fix this

    Thanks and Reagards

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Sajjad Ali


    Hello @chienthuatxd

    I would suggest to upgrade your PHP to v7.3.

    As for the issue with v5.6, can you please replace post function in Request.php with this code.

    public static function post($val, $safe)
        if ( isset( $_POST[$val] ) && in_array( $_POST[$val], $safe ) ) 
            return sanitize_text_field( $_POST[$val] );
        } else {
            return false;

    It should fix the issue. This change will be added in next update of Bialty. So there will not be any issue after update.

    Let me know if there is still any problem.

    • This reply was modified 5 months ago by Sajjad Ali.
    Thread Starter chienthuatxd


    @the-rock Thank you for your suggestion. But in our servers have many website. So we can not upgrade PHP7.x.
    I completed a temporary fixing and wait new your version

    Thank you!

    Although it isn’t great that your version of PHP isn’t supported, per WordPress documentation:

    PHP version 7.4 or greater.

    PHP version 7.4+ is what is supported/recommended.

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