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

Multiline text causes MalformedPrintROutputException: Could NOT find closing bracket of "Array" #1

Open
lanort opened this issue Aug 12, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@lanort
Copy link

lanort commented Aug 12, 2020

Thanks for creating this library. It helped a lot 🙏🙏

I found one issue when trying to parse an array with multiline text. For example:

<?php
        $data = <<<EOL
Array
(
    [id] => WH-123
    [resource] => Array
        (
            [id] => 1234
            [note_to_payer] => Hi,

this is a multiline text.

        )
)
EOL;

        $reverser = new ReversePrintR($data);
        print_r($reverser->reverse());

This causes:

ReversePrintR\Exception\MalformedPrintROutputException
Could NOT find closing bracket of "Array" on line 13.

@simivar simivar added the bug Something isn't working label Aug 12, 2020
@simivar simivar self-assigned this Aug 12, 2020
@simivar
Copy link
Owner

simivar commented Aug 12, 2020

Thank you, I was able to reproduce the issue. Will try to tackle it ASAP.

@simivar
Copy link
Owner

simivar commented Nov 11, 2020

I am very sorry that it takes so long to resolve but I need to re-think the way we do reversing to handle such cases.

@lanort
Copy link
Author

lanort commented Nov 11, 2020

@simivar no worries. I just wanted to let you know there is a "bug". 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants