dmitry          Wed Dec  7 04:41:27 2005 EDT

  Modified files:              
    /php-src/ext/standard       var.c 
  Log:
  Fixed sleep() magic method with private and protected members
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/var.c?r1=1.215&r2=1.216&ty=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.215 php-src/ext/standard/var.c:1.216
--- php-src/ext/standard/var.c:1.215    Mon Oct 17 11:03:04 2005
+++ php-src/ext/standard/var.c  Wed Dec  7 04:41:22 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: var.c,v 1.215 2005/10/17 15:03:04 derick Exp $ */
+/* $Id: var.c,v 1.216 2005/12/07 09:41:22 dmitry Exp $ */
 
 
 
@@ -777,11 +777,11 @@
                                        do {
                                                
zend_u_mangle_property_name(&priv_name, &prop_name_length, Z_TYPE_PP(name), 
ce->name, ce->name_length, 
                                                                        
Z_STRVAL_PP(name), Z_STRLEN_PP(name), ce->type & ZEND_INTERNAL_CLASS);
-                                               if 
(zend_u_hash_find(Z_OBJPROP_PP(struc), Z_TYPE_PP(name), priv_name, 
prop_name_length, (void *) &d) == SUCCESS) {
+                                               if 
(zend_u_hash_find(Z_OBJPROP_PP(struc), Z_TYPE_PP(name), priv_name, 
prop_name_length+1, (void *) &d) == SUCCESS) {
                                                        if (Z_TYPE_PP(name) == 
IS_UNICODE) {
-                                                               
php_var_serialize_unicode(buf, (UChar *)priv_name, prop_name_length-1);
+                                                               
php_var_serialize_unicode(buf, (UChar *)priv_name, prop_name_length);
                                                        } else {
-                                                               
php_var_serialize_string(buf, priv_name, prop_name_length-1);
+                                                               
php_var_serialize_string(buf, priv_name, prop_name_length);
                                                        }
                                                        efree(priv_name);
                                                        
php_var_serialize_intern(buf, d, var_hash TSRMLS_CC);
@@ -790,11 +790,11 @@
                                                efree(priv_name);
                                                
zend_u_mangle_property_name(&prot_name, &prop_name_length,  Z_TYPE_PP(name), 
"*", 1, 
                                                                        
Z_STRVAL_PP(name), Z_STRLEN_PP(name), ce->type & ZEND_INTERNAL_CLASS);
-                                               if 
(zend_u_hash_find(Z_OBJPROP_PP(struc), Z_TYPE_PP(name), prot_name, 
prop_name_length, (void *) &d) == SUCCESS) {
+                                               if 
(zend_u_hash_find(Z_OBJPROP_PP(struc), Z_TYPE_PP(name), prot_name, 
prop_name_length+1, (void *) &d) == SUCCESS) {
                                                        if (Z_TYPE_PP(name) == 
IS_UNICODE) {
-                                                               
php_var_serialize_unicode(buf, (UChar *)prot_name, prop_name_length-1);
+                                                               
php_var_serialize_unicode(buf, (UChar *)prot_name, prop_name_length);
                                                        } else {
-                                                               
php_var_serialize_string(buf, prot_name, prop_name_length-1);
+                                                               
php_var_serialize_string(buf, prot_name, prop_name_length);
                                                        }
                                                        efree(prot_name);
                                                        
php_var_serialize_intern(buf, d, var_hash TSRMLS_CC);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to