summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2018-09-05 15:10:27 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2018-09-05 15:10:27 +0200
commit21cd552e1e6685048ed159091274a8311b84d4c8 (patch)
treec21a6d4313919fc7d039e2f344ade0a8b89ad171 /ext/reflection/php_reflection.c
parent86c930e268759172d41f89a4f0148991dec27865 (diff)
parent7a2c9585c47a9ddcff0cb8246d4981e086528877 (diff)
downloadphp-git-21cd552e1e6685048ed159091274a8311b84d4c8.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fix #74454: Wrong exception being thrown when using ReflectionMethod
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 862936d81c..c2f6e198ad 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2973,8 +2973,10 @@ ZEND_METHOD(reflection_method, __construct)
switch (Z_TYPE_P(classname)) {
case IS_STRING:
if ((ce = zend_lookup_class(Z_STR_P(classname))) == NULL) {
- zend_throw_exception_ex(reflection_exception_ptr, 0,
- "Class %s does not exist", Z_STRVAL_P(classname));
+ if (!EG(exception)) {
+ zend_throw_exception_ex(reflection_exception_ptr, 0,
+ "Class %s does not exist", Z_STRVAL_P(classname));
+ }
if (classname == &ztmp) {
zval_ptr_dtor_str(&ztmp);
}