Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #36906 [DomCrawler] Catch expected ValueError (derrabus)
This PR was merged into the 3.4 branch. Discussion ---------- [DomCrawler] Catch expected ValueError | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #36872 | License | MIT | Doc PR | N/A `mb_convert_encoding()` raises a `ValueError` on php 8 if an unknown character set is passed. This causes trouble with the whole test suite because the temporary error handler is not deregistered in that case. Since the previously raised warning was actively ignored by that error handler, I'm now ignoring the `ValueError` as well. Also, I've wrapped the `restore_error_handler()` call into a `finally` statement to make the whole construct a bit more robust. Commits ------- b1db137 [DomCrawler] Catch expected ValueError.
- Loading branch information