• Resolved kero

    (@kingkero)


    PHP 7.4 deprecates the unparenthesized ternary operator, see https://www.php.net/manual/en/migration74.deprecated.php

    Deprecated: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /var/www/web/app/plugins/seo-by-rank-math/includes/modules/sitemap/class-admin.php on line 127

    Call Stack:
    0.0000 368928 1. {main}() /var/www/web/wp/wp-admin/index.php:0
    0.0001 369600 2. require_once(‘/var/www/web/wp/wp-admin/admin.php’) /var/www/web/wp/wp-admin/index.php:10
    0.0001 370080 3. require_once(‘/var/www/web/wp/wp-load.php’) /var/www/web/wp/wp-admin/admin.php:34
    0.0001 370816 4. require_once(‘/var/www/web/wp-config.php’) /var/www/web/wp/wp-load.php:42
    0.0016 386056 5. require_once(‘/var/www/web/wp/wp-settings.php’) /var/www/web/wp-config.php:9
    0.0331 2009408 6. do_action() /var/www/web/wp/wp-settings.php:392
    0.0331 2009784 7. WP_Hook->do_action() /var/www/web/wp/wp-includes/plugin.php:478
    0.0331 2009784 8. WP_Hook->apply_filters() /var/www/web/wp/wp-includes/class-wp-hook.php:312
    0.0347 2141704 9. RankMath\Module\Manager->load_modules() /var/www/web/wp/wp-includes/class-wp-hook.php:288
    0.0365 2294080 10. RankMath\Module\Manager->load_module() /var/www/web/app/plugins/seo-by-rank-math/includes/module/class-manager.php:341
    0.0366 2295416 11. RankMath\Sitemap\Sitemap->__construct() /var/www/web/app/plugins/seo-by-rank-math/includes/module/class-manager.php:361
    0.0366 2295416 12. spl_autoload_call() /var/www/web/app/plugins/seo-by-rank-math/includes/modules/sitemap/class-sitemap.php:32
    0.0366 2295464 13. Composer\Autoload\ClassLoader->loadClass() /var/www/web/app/plugins/seo-by-rank-math/includes/modules/sitemap/class-sitemap.php:32
    0.0366 2295464 14. Composer\Autoload\includeFile() /var/www/vendor/composer/ClassLoader.php:322

    This can easily done by changing

    $url = isset( $urls[ $post_type ] ) ? $urls[ $post_type ] : in_array( $name, [ 'post', 'page' ], true ) ? KB::get( "sitemap-{$name}" ) : '';

    to

    $url = isset( $urls[ $post_type ] ) ? $urls[ $post_type ] : ( in_array( $name, [ 'post', 'page' ], true ) ? KB::get( "sitemap-{$name}" ) : '' );

    in includes/modules/sitemap/class-admin.php line 126

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Rank Math SEO

    (@rankmath)

    Hello @kingkero

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    Thank you for lending a hand in providing a fix. We have made a note of this and a fix will be included in an upcoming update.

    We seek your patience and understanding in this matter.

    In the meantime, if there’s anything else we can help you with, please let us know. We are here to help.

    Plugin Author Rank Math SEO

    (@rankmath)

    Hello @kingkero

    Please update to the latest version, that should resolve the issue.

    Appreciate your patience and understanding. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP 7.4 support: Deprecated: Unparenthesized’ is closed to new replies.