summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2006-10-18 16:35:15 +0000
committerJohannes Schlüter <johannes@php.net>2006-10-18 16:35:15 +0000
commitdcf249004c3eea72b3405b3829b7f912fb4c6492 (patch)
treea48d29b75f4fe6c5ad1d8ed2a530bd869b16ce3e /Zend/zend_execute_API.c
parentb99ba323d56d16c598a37d8ae89b8472e974c42b (diff)
downloadphp-git-dcf249004c3eea72b3405b3829b7f912fb4c6492.tar.gz
- MFH: Fix #38465 (ReflectionParameter fails if default value is an access to self::
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 524b78735f..3098bf4850 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -448,7 +448,7 @@ ZEND_API int zend_is_true(zval *op)
#include "../TSRM/tsrm_strtok_r.h"
-ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
+ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC)
{
zval *p = *pp;
zend_bool inline_change = (zend_bool) (unsigned long) arg;
@@ -464,7 +464,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
refcount = p->refcount;
is_ref = p->is_ref;
- if (!zend_get_constant(p->value.str.val, p->value.str.len, &const_value TSRMLS_CC)) {
+ if (!zend_get_constant_ex(p->value.str.val, p->value.str.len, &const_value, scope TSRMLS_CC)) {
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
p->value.str.val,
p->value.str.val);
@@ -503,7 +503,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
zend_hash_move_forward(Z_ARRVAL_P(p));
continue;
}
- if (!zend_get_constant(str_index, str_index_len-1, &const_value TSRMLS_CC)) {
+ if (!zend_get_constant_ex(str_index, str_index_len-1, &const_value, scope TSRMLS_CC)) {
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", str_index, str_index);
zend_hash_move_forward(Z_ARRVAL_P(p));
continue;
@@ -552,6 +552,10 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
return 0;
}
+ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
+{
+ zval_update_constant_ex(pp, arg, NULL TSRMLS_CC);
+}
int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC)
{