X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_api.c;h=7979e7bdefcd551e0ac3847dc260a2b6b1e29098;hp=04247fa310d771ac16a9fc99e810671ff1f7db56;hb=ac6011fd12223817daa9ab93f8208da0281022b6;hpb=195df77a27048303b611e834d3f4eda03357ca2c diff --git a/http_api.c b/http_api.c index 04247fa..7979e7b 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 TSRMLS_CC); +#endif zval_ptr_dtor(&old_exception); return new_exception; }