diff options
Diffstat (limited to 'sapi/cli')
-rw-r--r-- | sapi/cli/php_cli.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index 845312e9c6..4874e0920c 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -1067,12 +1067,10 @@ static int do_cli(int argc, char **argv) /* {{{ */ pce->constructor, Z_OBJ(ref), NULL, &arg); if (EG(exception)) { - zval tmp, *msg, rv; - - ZVAL_OBJ(&tmp, EG(exception)); - msg = zend_read_property(zend_ce_exception, &tmp, "message", sizeof("message")-1, 0, &rv); + zval rv; + zval *msg = zend_read_property(zend_ce_exception, EG(exception), "message", sizeof("message")-1, 0, &rv); zend_printf("Exception: %s\n", Z_STRVAL_P(msg)); - zval_ptr_dtor(&tmp); + zend_object_release(EG(exception)); EG(exception) = NULL; } else { zend_print_zval(&ref, 0); |