-
I am encountering a fatal error when enabling the Rank Math breadcrumbs feature on my WordPress site. The error causes the site to crash with the following message in the debug log:
PHP Fatal error: Uncaught ArgumentCountError: 3 arguments are required, 2 given in /wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php on line 275
Stack trace:
#0 /wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php(275): sprintf()
#1 [internal function]: RankMath\Frontend\Breadcrumbs->add_crumbs_search()
#… (rest of stack trace)Environment Details:
Rank Math plugin version: [Your exact version, e.g. 1.0.80]
WordPress version: [Your WordPress version, e.g. 6.4.1]
PHP version: 8.2.27
Theme: Kadence (with child theme)
Breadcrumbs enabled via Rank Math settings
Error disappears when breadcrumbs are disabled
Steps to reproduce:
Activate Rank Math plugin.
Enable breadcrumbs in Rank Math settings or add breadcrumbs via theme hook.
Visit any page — the site crashes with the above error.
Additional Information:
The error is related to the sprintf() call in class-breadcrumbs.php line 275, where it expects 3 arguments but receives 2. This causes a fatal error on PHP 8.2.x.Disabling breadcrumbs resolves the error but removes breadcrumb functionality.
Please investigate and release a fix for this compatibility issue with PHP 8.2.
Thank you for your support!
The ticket ‘Fatal Error in Rank Math Breadcrumbs with PHP 8.2.27 – ArgumentCountError on spr’ is closed to new replies.