diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2018-09-05 15:07:59 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2018-09-05 15:07:59 +0200 |
commit | 7a2c9585c47a9ddcff0cb8246d4981e086528877 (patch) | |
tree | 931ed3d83f37adf82a90e7c8b55fc59b37af720b /ext/reflection/php_reflection.c | |
parent | 21f8cd2a92fc105a0a782e35658389d0dc33a0c9 (diff) | |
parent | c0a389a9277070f5ef53c230f34aa5072a9f0985 (diff) | |
download | php-git-7a2c9585c47a9ddcff0cb8246d4981e086528877.tar.gz |
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
Fix #74454: Wrong exception being thrown when using ReflectionMethod
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index a0d4ebb4a0..3bd31e48a8 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3010,8 +3010,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_dtor(&ztmp); } |