Created by
Ruslan Osmanov
| diff --git a/php5/watcher.c b/php5/watcher.c
index 7ba6d97..0587043 100644
--- a/php5/watcher.c
+++ b/php5/watcher.c
@@ -17,6 +17,7 @@
*/
#include "php_ev.h"
+#include "zend_exceptions.h"
/* Defined in ev.c */
extern zend_class_entry *ev_loop_class_entry_ptr;
@@ -59,6 +60,7 @@ void php_ev_watcher_callback(EV_P_ ev_watcher *watcher, int revents)
pfci->param_count = 2;
pfci->no_separation = 1;
+ zend_exception_save(TSRMLS_C);
if (EXPECTED(zend_call_function(pfci, php_ev_watcher_fcc(watcher) TSRMLS_CC) == SUCCESS
&& retval_ptr)) {
zval_ptr_dtor(&retval_ptr);
@@ -66,6 +68,7 @@ void php_ev_watcher_callback(EV_P_ ev_watcher *watcher, int revents)
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"An error occurred while invoking the callback");
}
+ zend_exception_restore(TSRMLS_C);
zval_ptr_dtor(&self);
zval_ptr_dtor(&key2);
|