facebook/hhvm — pull request #3834 by tstarling (2014-09-24 05:11:19+00:00)
Title: EZC: clear EG(exception) on return from zend_wrap_func()

Otherwise, if the exception is caught and then control is returned into
a zend_call_function() call which wrapped the throwing function, then
zend_call_function() will erroneously rethrow the exception, even though
it has already been handled.

https://bugzilla.wikimedia.org/show_bug.cgi?id=71174