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

Cannot handle Excessive depth error #207

Open
jeffreyzant opened this issue Apr 22, 2021 · 2 comments
Open

Cannot handle Excessive depth error #207

jeffreyzant opened this issue Apr 22, 2021 · 2 comments

Comments

@jeffreyzant
Copy link

Hi!

We've been using your package for quite a while and we really enjoy it. Today we tried to handle an excessive piece of HTML code and the import of the document just stops. This means documents are partially rendered without any warning.

There is a possibility for us to handle this manually by calling the libxml_get_errors(), but the errors are cleared on the following line: https://github.com/tijsverkoyen/CssToInlineStyles/blob/master/src/CssToInlineStyles.php#L117

Why is this and could this behavior be changed? I'm not even sure why libxml_use_internal_errors is called for a second time with the error output as it requests a boolean or null value.

@stof
Copy link
Collaborator

stof commented Apr 22, 2021

$internalErrors is not the error output. It is the previous state of libxml_use_internal_errors

@jeffreyzant
Copy link
Author

Ahh okay, I've missed that! I created a PR with a possible solution to read the errors as the libxml_use_internal_errors() clears the libxml_get_errors() when it is set.

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

No branches or pull requests

2 participants