com php-src: Do not truncate exception traces upon anon class name: Zend/zend_exceptions.c
| From: | Bob Weinand | Date: | Tue, 18 Aug 2015 01:27:56 +0000 |
| Subject: | com php-src: Do not truncate exception traces upon anon class name: Zend/zend_exceptions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88573@lists.php.net to get a copy of this message | ||
Commit: b0c77fb80c9bceac37ec266f2d5a20131755c44a
Author: Bob Weinand <bobwei9@hotmail.com> Tue, 18 Aug 2015 03:27:56 +0200
Parents: c042c64c43e1d62c40f3ea89a62b834d07dbba0c
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b0c77fb80c9bceac37ec266f2d5a20131755c44a
Log:
Do not truncate exception traces upon anon class name
Changed paths:
M Zend/zend_exceptions.c
Diff:
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 307589b..7a9e232 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -442,7 +442,7 @@ ZEND_METHOD(error_exception, getSeverity)
zend_error(E_WARNING, "Value for %s is no string", key); \
smart_str_appends(str, "[unknown]"); \
} else { \
- smart_str_append(str, Z_STR_P(tmp)); \
+ smart_str_append_escaped(str, Z_STRVAL_P(tmp), Z_STRLEN_P(tmp)); \
} \
} \
} while (0)
@@ -556,7 +556,7 @@ static void _build_trace_args(zval *arg, smart_str *str) /* {{{ */
break;
case IS_OBJECT:
smart_str_appends(str, "Object(");
- smart_str_append(str, Z_OBJCE_P(arg)->name);
+ smart_str_append_escaped(str, ZSTR_VAL(Z_OBJCE_P(arg)->name),
ZSTR_LEN(Z_OBJCE_P(arg)->name));
smart_str_appends(str, "), ");
break;
}