From: Michael Wallner Date: Wed, 30 Dec 2009 12:31:03 +0000 (+0000) Subject: facilitate zend_exception_set_previous() of PHP 5.3 X-Git-Tag: RELEASE_1_7_0~24 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=758075cfcd90fe3e9b3db6feb0f675d35cb664a2;p=m6w6%2Fext-http facilitate zend_exception_set_previous() of PHP 5.3 --- diff --git a/http_api.c b/http_api.c index 04247fa..00461d9 100644 --- a/http_api.c +++ b/http_api.c @@ -180,7 +180,10 @@ zval *_http_exception_wrap(zval *old_exception, zval *new_exception, zend_class_ copy_bt_args(old_exception, new_exception TSRMLS_CC); copy_bt_args(old_exception, sub_exception TSRMLS_CC); } - +#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3 + Z_ADDREF_P(old_exception); + zend_exception_set_previous(new_exception, old_exception); +#endif zval_ptr_dtor(&old_exception); return new_exception; }