cvs: ZendEngine2(PHP_5_3) / zend_object_handlers.c /tests bug44141.phpt

[email protected] ("Dmitry Stogov")
Newsgroups php.zend-engine.cvs
Message-ID <cvsdmitry1203602145@cvsserver>
dmitry		Thu Feb 21 13:55:45 2008 UTC

  Added files:                 (Branch: PHP_5_3)
    /ZendEngine2/tests	bug44141.phpt 

  Modified files:              
    /ZendEngine2	zend_object_handlers.c 
  Log:
  Fixed bug #44141 (private parent constructor callable through static function)
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_object_handlers.c?r1=1.135.2.6.2.22.2.11&r2=1.135.2.6.2.22.2.12&diff_format=u
Index: ZendEngine2/zend_object_handlers.c
diff -u ZendEngine2/zend_object_handlers.c:1.135.2.6.2.22.2.11 ZendEngine2/zend_object_handlers.c:1.135.2.6.2.22.2.12
--- ZendEngine2/zend_object_handlers.c:1.135.2.6.2.22.2.11	Mon Dec 31 07:17:04 2007
+++ ZendEngine2/zend_object_handlers.c	Thu Feb 21 13:55:45 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_object_handlers.c,v 1.135.2.6.2.22.2.11 2007/12/31 07:17:04 sebastian Exp $ */
+/* $Id: zend_object_handlers.c,v 1.135.2.6.2.22.2.12 2008/02/21 13:55:45 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_globals.h"
@@ -1025,7 +1025,7 @@
 		} else if (constructor->op_array.fn_flags & ZEND_ACC_PRIVATE) {
 			/* Ensure that if we're calling a private function, we're allowed to do so.
 			 */
-			if (Z_OBJ_HANDLER_P(object, get_class_entry)(object TSRMLS_CC) != EG(scope)) {
+			if (constructor->common.scope != EG(scope)) {
 				if (EG(scope)) {
 					zend_error(E_ERROR, "Call to private %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope)->name);
 				} else {

http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug44141.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug44141.phpt
+++ ZendEngine2/tests/bug44141.phpt
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.