Skip to content

Fix php 8.1 deprecation issues caused by preg_replace error #42

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

Conversation

karyna-t
Copy link

Hotfix for the deprecation warning on PHP 8.1 (passing null to preg_replace), which is caused by the previous preg_replace returning NULL (due to PREG_BACKTRACK_LIMIT_ERROR).

This fix should be rolled back after we fix the regular expression (L198).
The main issue described here:
(TBD Here will be the link to the ticket)

Comment on lines +202 to +203
// this preg_replace may return NULL in case of error (PREG_BACKTRACK_LIMIT_ERROR).
// In that case the result of this method will be an empty string.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// this preg_replace may return NULL in case of error (PREG_BACKTRACK_LIMIT_ERROR).
// In that case the result of this method will be an empty string.
// this preg_replace call can return NULL in case of error (PREG_BACKTRACK_LIMIT_ERROR).
// In this case, the result of this method will be an empty string.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in internal repo

@xmav
Copy link

xmav commented Dec 10, 2021

@magento import code to magento-trigger/zf1

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

Successfully merging this pull request may close these issues.

4 participants