Skip to content

[Php70] Handle crash on EregToPregMatchRector#2460

Merged
TomasVotruba merged 2 commits intomainfrom
close-2459
Jun 9, 2022
Merged

[Php70] Handle crash on EregToPregMatchRector#2460
TomasVotruba merged 2 commits intomainfrom
close-2459

Conversation

@samsonasik
Copy link
Copy Markdown
Member

@samsonasik samsonasik commented Jun 9, 2022

Given the following code:

ereg_replace('[^0-9.-]', ' ', 'le 09.78-95 65/02');

It cause error:

"System error: ""[" does not have a matching "]"" 

This PR fix it.

Closes #2459
Fixes rectorphp/rector#7217

@samsonasik
Copy link
Copy Markdown
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit eaea281 into main Jun 9, 2022
@TomasVotruba TomasVotruba deleted the close-2459 branch June 9, 2022 09:41
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.

Error refactoring ereg_replace to preg_replace

2 participants