Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rank Math (CMB2) executes WordPress site name as a php function causing fatal errors #296

Open
DigitalServicesLab opened this issue Dec 16, 2024 · 0 comments

Comments

@DigitalServicesLab
Copy link

If your website name (Settings > General > Site Title) is also the name of a PHP function, RankMath throws fatal errors as it tries to execute the function....

E.G. change your site title to trim or str_replace and you will get fatal errors thrown by rank math as it tries to execute those functions. To be clear, there are no parentheses needed in the site title - Rank Math is graciously converting it to an executable php function instead of handling it securely as a cleaned string...

PHP Fatal error: Uncaught ArgumentCountError: trim() expects at most 2 arguments, 3 given

PHP Fatal error: Uncaught TypeError: str_replace(): Argument #2 (replace)must be of type array|string, CMB2_Field given

Unfortunately the site I am working on is called TRiM which is an acronym..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant