summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2002-07-27 15:53:14 +0000
committerAndi Gutmans <andi@php.net>2002-07-27 15:53:14 +0000
commitb476ddf183aebfb32a4bb3f584c2749ff092635b (patch)
treee35185762ef6fa1d2ffc850852788be0a2714893 /Zend/zend_execute_API.c
parentfbbeaec63038ec44cc2cebe4726019dec245e259 (diff)
downloadphp-git-b476ddf183aebfb32a4bb3f584c2749ff092635b.tar.gz
- Make sure classes are first looked for in the current scope.
- Make sure that during inheritance the global scope is searched if the - current one doesn't work.
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index efa5cafee9..426379bc22 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -645,6 +645,11 @@ ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***
zval *retval_ptr;
int retval;
+ if (EG(scope)) {
+ if (zend_hash_find(&EG(scope)->class_table, name, name_length+1, (void **) ce) == SUCCESS) {
+ return SUCCESS;
+ }
+ }
if (zend_hash_find(EG(class_table), name, name_length+1, (void **) ce) == SUCCESS) {
return SUCCESS;
}