summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2012-08-24 10:55:17 +0200
committerDerick Rethans <github@derickrethans.nl>2012-08-24 10:55:17 +0200
commite5bfcd340a8e6aa9e46bef43894c78c06e80a3c8 (patch)
tree7e11e961bd43b1eb3af7149ce8af8b03d7f4ac2c /ext/reflection/php_reflection.c
parent0a2833bbefd803a63014429973b14839718975e2 (diff)
parent13bcf685cb0a92e502ebe39f4b22c64304a9f333 (diff)
downloadphp-git-e5bfcd340a8e6aa9e46bef43894c78c06e80a3c8.tar.gz
Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index e98652ba23..593a0506b0 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2379,9 +2379,7 @@ ZEND_METHOD(reflection_parameter, isDefaultValueAvailable)
{
RETURN_FALSE;
}
- if (param->offset < param->required) {
- RETURN_FALSE;
- }
+
precv = _get_recv_op((zend_op_array*)param->fptr, param->offset);
if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) {
RETURN_FALSE;
@@ -2408,10 +2406,6 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot determine default value for internal functions");
return;
}
- if (param->offset < param->required) {
- zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter is not optional");
- return;
- }
precv = _get_recv_op((zend_op_array*)param->fptr, param->offset);
if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) {
zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Internal error");