PHP_MINIT_FUNCTION(http_exception_object)
{
- HTTP_REGISTER_EXCEPTION(HttpException, http_exception_object_ce, zend_exception_get_default());
+ HTTP_REGISTER_EXCEPTION(HttpException, http_exception_object_ce, ZEND_EXCEPTION_GET_DEFAULT());
HTTP_REGISTER_EXCEPTION(HttpRuntimeException, HTTP_EX_CE(runtime), HTTP_EX_DEF_CE);
HTTP_REGISTER_EXCEPTION(HttpInvalidParamException, HTTP_EX_CE(invalid_param), HTTP_EX_DEF_CE);
HTTP_REGISTER_EXCEPTION(HttpHeaderException, HTTP_EX_CE(header), HTTP_EX_DEF_CE);
{
zval **args, **trace_0, *old_trace_0, *trace = NULL;
- if ((trace = zend_read_property(zend_exception_get_default(), from, "trace", lenof("trace"), 0 TSRMLS_CC))) {
+ if ((trace = zend_read_property(ZEND_EXCEPTION_GET_DEFAULT(), from, "trace", lenof("trace"), 0 TSRMLS_CC))) {
if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void *) &trace_0)) {
old_trace_0 = *trace_0;
if (SUCCESS == zend_hash_find(Z_ARRVAL_PP(trace_0), "args", sizeof("args"), (void *) &args)) {
- if ((trace = zend_read_property(zend_exception_get_default(), to, "trace", lenof("trace"), 0 TSRMLS_CC))) {
+ if ((trace = zend_read_property(ZEND_EXCEPTION_GET_DEFAULT(), to, "trace", lenof("trace"), 0 TSRMLS_CC))) {
if (SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void *) &trace_0)) {
ZVAL_ADDREF(*args);
add_assoc_zval(*trace_0, "args", *args);
# define end_error_handling()
#endif
+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION > 5
+# define ZEND_EXCEPTION_GET_DEFAULT() zend_exception_get_default(TSRMLS_C)
+#else
+# define ZEND_EXCEPTION_GET_DEFAULT() zend_exception_get_default()
+#endif
+
#ifndef E_THROW
# define E_THROW 0
#endif