Skip to content

[Php70] Handle empty branch crash on unprintable char \x0C on EregToPregMatchRector #6368

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

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik
Copy link
Member Author

Fixed 🎉 /cc @bisenegger

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit fbe1777 into main Oct 9, 2024
36 checks passed
@samsonasik samsonasik deleted the crash-empty-branch branch October 9, 2024 11:46
{
if ($normalizeUnprintableChar) {
$content = str_replace("\x0C", '\\\f', $content);
Copy link
Member Author

Choose a reason for hiding this comment

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

On scoper downgrade, it seems replaced with

        if ($normalizeUnprintableChar) {
            $content = \str_replace("\f", '\\\\f', $content);
        }

I will check when it deployed to getrector.com

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems working ok https://getrector.com/demo/b1ed83c8-c2a0-40bb-b3d4-0e098573f462

@bisenegger please try latest "rector/rector": "dev-main" and test if the issue persist, better if you can provide reproducible code like the link above, and better, provide patch as well if possible, thank you

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] Could not process "/src/phpcms/parser/include/class.pax_phpcms.php" file, due to: "System error: "empty branch"
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy