cvs: ZendEngine2 / zend_API.c

[email protected] ("Marcus Boerger")
Newsgroups php.zend-engine.cvs
Message-ID <cvshelly1202238419@cvsserver>
helly		Tue Feb  5 19:06:59 2008 UTC

  Modified files:              
    /ZendEngine2	zend_API.c 
  Log:
  - Fix cross class tree reference issues with callbacks
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.457&r2=1.458&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.457 ZendEngine2/zend_API.c:1.458
--- ZendEngine2/zend_API.c:1.457	Mon Feb  4 13:59:27 2008
+++ ZendEngine2/zend_API.c	Tue Feb  5 19:06:59 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.c,v 1.457 2008/02/04 13:59:27 helly Exp $ */
+/* $Id: zend_API.c,v 1.458 2008/02/05 19:06:59 helly Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -2721,7 +2721,10 @@
 	if (colon.v != NULL) {
 		/* This is a compound name.
 		 * Try to fetch class and then find static method. */
+		zend_class_entry *last_scope = EG(scope);
+		EG(scope) = ce_org;
 		*ce_ptr = zend_u_fetch_class(Z_TYPE_P(callable), Z_UNIVAL_P(callable), clen, ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_SILENT TSRMLS_CC);
+		EG(scope) = last_scope;
 		if (!*ce_ptr) {
 			char *cname = estrndup(Z_STRVAL_P(callable), clen);
 			if (error) zend_spprintf(error, 0, "class '%v' not found", cname);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.