summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorZiMuyang <yuanhualong666@gmail.com>2019-10-27 23:21:31 +0800
committerNikita Popov <nikita.ppv@gmail.com>2019-10-28 11:42:45 +0100
commit99c84cd92aabbb4cfea585346242ff3e40941cc0 (patch)
tree24f2b1b2d45d7db19ce1298bea0e54979a7f3826 /Zend/zend_exceptions.c
parent1ddda13d846936fb625823778d14df68158d0e56 (diff)
downloadphp-git-99c84cd92aabbb4cfea585346242ff3e40941cc0.tar.gz
Remove redundant variable rv and optimize code
Closes GH-4864.
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index ecd946a06e..8672ed8e00 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -979,7 +979,7 @@ ZEND_API ZEND_COLD void zend_exception_error(zend_object *ex, int severity) /* {
zend_class_entry *ce_exception;
ZVAL_OBJ(&exception, ex);
- ce_exception = Z_OBJCE(exception);
+ ce_exception = ex->ce;
EG(exception) = NULL;
if (ce_exception == zend_ce_parse_error || ce_exception == zend_ce_compile_error) {
zend_string *message = zval_get_string(GET_PROPERTY(&exception, ZEND_STR_MESSAGE));
@@ -992,7 +992,7 @@ ZEND_API ZEND_COLD void zend_exception_error(zend_object *ex, int severity) /* {
zend_string_release_ex(file, 0);
zend_string_release_ex(message, 0);
} else if (instanceof_function(ce_exception, zend_ce_throwable)) {
- zval tmp, rv;
+ zval tmp;
zend_string *str, *file = NULL;
zend_long line = 0;