nikic/PHP-Parser — pull request #87 by theseer (2014-01-21 23:52:26+00:00)
Title: Ensure no registered error handler will see the 'reset' error

The current implementation in the default Lexer triggers a (suppressed) notice to cause error_get_last() into a "known" default state. While that technically doesn't clear any error but rather "overwrites" whatever other error might have been on the stack, the current implemented conflicts with a strict a potentially registered error handler where every error gets converted into an exception.

This PR fixes that by registering a temporary error handler before triggering the error, followed by a direct removal and thus restoring the previous handler.