Behat/Behat — pull request #172 by muhqu (2012-07-20 06:46:08+00:00)
Title: Error reporting

There is an issue using the `BEHAT_ERROR_REPORTING` constant to suppress `E_NOTICE`. When an `E_NOTICE` is thrown inside the `FeatureContext` constructor. I have tracked it down to the point that the custom error handler restores previous handlers using `set_error_handler()` without knowing which error level mask the previous handler used. So the right way to fix it was to use `restore_error_handler()` as it preserves the custom ErrorLevel of the previous custom handler.

Also, there was no `error-reporting.feature` testing the behavior of the constant, so I created one.