For Programmers: Free Programming Magazines  


Home > Archive > PHP Zend Engine > July 2004 > cvs: ZendEngine2 / zend_object_handlers.c









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: ZendEngine2 / zend_object_handlers.c
Zeev Suraski

2004-07-22, 8:55 am

zeev Thu Jul 22 07:54:27 2004 EDT

Modified files:
/ZendEngine2 zend_object_handlers.c
Log:
Fix bug in handling of protected properties


http://cvs.php.net/diff.php/ZendEng...3&r2=1.104&ty=u
Index: ZendEngine2/zend_object_handlers.c
diff -u ZendEngine2/zend_object_handlers.c:1.103 ZendEngine2/zend_object_handlers.c:1.104
--- ZendEngine2/zend_object_handlers.c:1.103 Mon Jul 19 10:26:53 2004
+++ ZendEngine2/zend_object_handlers.c Thu Jul 22 07:54:27 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: zend_object_handlers.c,v 1.103 2004/07/19 14:26:53 stas Exp $ */
+/* $Id: zend_object_handlers.c,v 1.104 2004/07/22 11:54:27 zeev Exp $ */

#include "zend.h"
#include "zend_globals.h"
@@ -161,13 +161,7 @@
case ZEND_ACC_PUBLIC:
return 1;
case ZEND_ACC_PROTECTED:
- while (ce) {
- if (ce==EG(scope)) {
- return 1;
- }
- ce = ce->parent;
- }
- return 0;
+ return zend_check_protected(ce, EG(scope));
case ZEND_ACC_PRIVATE:
if (ce==EG(scope) && EG(scope)) {
return 1;
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com