summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-02-25 13:01:18 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-02-25 13:01:18 +0100
commit461e140afc40040a055a16746b8669372caf8d99 (patch)
tree23bfdd155ef3e3c866ed3a99b8932bfc0edc9752 /Zend/zend_exceptions.c
parent4ac954ac3e1217864e592ebb1531b4f0f31e2264 (diff)
parentaf37d58cf7b77814b93ea97a8dcd2afb46c4424e (diff)
downloadphp-git-461e140afc40040a055a16746b8669372caf8d99.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 8e390feb1a..3ad5748e4d 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -400,11 +400,13 @@ ZEND_METHOD(error_exception, __construct)
Get the file in which the exception occurred */
ZEND_METHOD(exception, getFile)
{
- zval rv;
+ zval *prop, rv;
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_FILE));
+ prop = GET_PROPERTY(getThis(), ZEND_STR_FILE);
+ ZVAL_DEREF(prop);
+ ZVAL_COPY(return_value, prop);
}
/* }}} */
@@ -412,11 +414,13 @@ ZEND_METHOD(exception, getFile)
Get the line in which the exception occurred */
ZEND_METHOD(exception, getLine)
{
- zval rv;
+ zval *prop, rv;
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_LINE));
+ prop = GET_PROPERTY(getThis(), ZEND_STR_LINE);
+ ZVAL_DEREF(prop);
+ ZVAL_COPY(return_value, prop);
}
/* }}} */
@@ -424,11 +428,13 @@ ZEND_METHOD(exception, getLine)
Get the exception message */
ZEND_METHOD(exception, getMessage)
{
- zval rv;
+ zval *prop, rv;
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_MESSAGE));
+ prop = GET_PROPERTY(getThis(), ZEND_STR_MESSAGE);
+ ZVAL_DEREF(prop);
+ ZVAL_COPY(return_value, prop);
}
/* }}} */
@@ -436,11 +442,13 @@ ZEND_METHOD(exception, getMessage)
Get the exception code */
ZEND_METHOD(exception, getCode)
{
- zval rv;
+ zval *prop, rv;
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_CODE));
+ prop = GET_PROPERTY(getThis(), ZEND_STR_CODE);
+ ZVAL_DEREF(prop);
+ ZVAL_COPY(return_value, prop);
}
/* }}} */
@@ -448,11 +456,13 @@ ZEND_METHOD(exception, getCode)
Get the stack trace for the location in which the exception occurred */
ZEND_METHOD(exception, getTrace)
{
- zval rv;
+ zval *prop, rv;
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_TRACE));
+ prop = GET_PROPERTY(getThis(), ZEND_STR_TRACE);
+ ZVAL_DEREF(prop);
+ ZVAL_COPY(return_value, prop);
}
/* }}} */
@@ -460,11 +470,13 @@ ZEND_METHOD(exception, getTrace)
Get the exception severity */
ZEND_METHOD(error_exception, getSeverity)
{
- zval rv;
+ zval *prop, rv;
DEFAULT_0_PARAMS;
- ZVAL_COPY(return_value, GET_PROPERTY(getThis(), ZEND_STR_SEVERITY));
+ prop = GET_PROPERTY(getThis(), ZEND_STR_SEVERITY);
+ ZVAL_DEREF(prop);
+ ZVAL_COPY(return_value, prop);
}
/* }}} */