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

[PHP 8.4] Deprecated functionality: preg_replace() #4310

Open
addison74 opened this issue Oct 25, 2024 · 0 comments · May be fixed by #4311
Open

[PHP 8.4] Deprecated functionality: preg_replace() #4310

addison74 opened this issue Oct 25, 2024 · 0 comments · May be fixed by #4311
Labels
3rd-party Related to 3rd-party code or issues with customization bug PHP 8 Related to PHP8

Comments

@addison74
Copy link
Contributor

addison74 commented Oct 25, 2024

This is the error message

Deprecated functionality: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php on line 45

// replace [value] with [inherit]
        $namePrefix = preg_replace('#\[value\](\[\])?$#', '', $element->getName());

I am getting this error when running extension MageWorx SEO Suite Ultimate. Just accesss Backend > System > Config > MageWorx Extensions & Support to get it. Maybe other extensions could produce the same issue.

It must be

// replace [value] with [inherit]
        $namePrefix = preg_replace('#\[value\](\[\])?$#', '', (string) $element->getName()'');
@addison74 addison74 added the bug label Oct 25, 2024
@addison74 addison74 linked a pull request Oct 25, 2024 that will close this issue
@addison74 addison74 linked a pull request Oct 26, 2024 that will close this issue
@sreichel sreichel added 3rd-party Related to 3rd-party code or issues with customization PHP 8 Related to PHP8 labels Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party Related to 3rd-party code or issues with customization bug PHP 8 Related to PHP8
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants