diff options
| author | Dmitry Stogov <dmitry@php.net> | 2008-10-10 15:53:31 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2008-10-10 15:53:31 +0000 |
| commit | a1a12497539719c97bc807fe9f40854a2aa1ba6c (patch) | |
| tree | 561c9fb4b8e24238470c94521bec0186f433a4ae /Zend/zend_execute_API.c | |
| parent | 27fbfa3d084a6b660b8e8e1d679b19f642b53dcc (diff) | |
| download | php-git-a1a12497539719c97bc807fe9f40854a2aa1ba6c.tar.gz | |
Fixed bug #46246 (difference between call_user_func(array($this, $method)) and $this->$method())
Diffstat (limited to 'Zend/zend_execute_API.c')
| -rw-r--r-- | Zend/zend_execute_API.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index dec7f67fe2..07a42b5d34 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -824,7 +824,9 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS } EX(function_state).function = Z_OBJ_HT_PP(fci->object_pp)->get_method(fci->object_pp, fname, fname_len TSRMLS_CC); - if (EX(function_state).function && calling_scope != EX(function_state).function->common.scope) { + if (EX(function_state).function && + (EX(function_state).function->common.fn_flags & ZEND_ACC_PRIVATE) == 0 && + calling_scope != EX(function_state).function->common.scope) { char *function_name_lc = zend_str_tolower_dup(fname, fname_len); if (zend_hash_find(&calling_scope->function_table, function_name_lc, fname_len+1, (void **) &EX(function_state).function)==FAILURE) { efree(function_name_lc); |
