diff options
author | Johannes Schlüter <johannes@php.net> | 2010-11-21 12:24:09 +0000 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2010-11-21 12:24:09 +0000 |
commit | 5a1e9d1d6b1326175b1327919786364a0d1b4a58 (patch) | |
tree | 9dea6077ffefff3b94ad3bb6045924b5a8a49e7f /ext/reflection/php_reflection.c | |
parent | 224bfb38f7a15bac3b9fa69824dc672ab80e1c49 (diff) | |
download | php-git-5a1e9d1d6b1326175b1327919786364a0d1b4a58.tar.gz |
- Fix #52854 (ReflectionClass::newInstanceArgs does not work for classes without constructors
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 9f06deeabf..fce1b583c4 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4296,7 +4296,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs) if (params) { efree(params); } - } else if (!ZEND_NUM_ARGS()) { + } else if (!ZEND_NUM_ARGS() || !argc) { object_init_ex(return_value, ce); } else { zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %s does not have a constructor, so you cannot pass any constructor arguments", ce->name); |