moriyoshi               Sat Jun 26 01:39:00 2004 EDT

  Modified files:              
    /php-src/ext/mbstring       mbstring.c 
    /php-src/ext/mbstring/tests bug26639.phpt 
    /php-src    NEWS 
  Log:
  - Fix bug #28466 (mbstring_convert_variables() problem).
  
  
http://cvs.php.net/diff.php/php-src/ext/mbstring/mbstring.c?r1=1.213&r2=1.214&ty=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.213 php-src/ext/mbstring/mbstring.c:1.214
--- php-src/ext/mbstring/mbstring.c:1.213       Thu Mar 11 20:59:46 2004
+++ php-src/ext/mbstring/mbstring.c     Sat Jun 26 01:39:00 2004
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mbstring.c,v 1.213 2004/03/12 01:59:46 iliaa Exp $ */
+/* $Id: mbstring.c,v 1.214 2004/06/26 05:39:00 moriyoshi Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -2614,6 +2614,7 @@
                                                        stack[stack_level] = var;
                                                        stack_level++;
                                                        var = hash_entry;
+                                                       SEPARATE_ZVAL(hash_entry);
                                                        target_hash = HASH_OF(*var);
                                                        if (target_hash != NULL) {
                                                                
zend_hash_internal_pointer_reset(target_hash);
http://cvs.php.net/diff.php/php-src/ext/mbstring/tests/bug26639.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/ext/mbstring/tests/bug26639.phpt
diff -u php-src/ext/mbstring/tests/bug26639.phpt:1.1 
php-src/ext/mbstring/tests/bug26639.phpt:1.2
--- php-src/ext/mbstring/tests/bug26639.phpt:1.1        Thu Dec 18 04:50:20 2003
+++ php-src/ext/mbstring/tests/bug26639.phpt    Sat Jun 26 01:39:00 2004
@@ -33,7 +33,7 @@
 $a = "����������";
 $b = array(&$a);
 $c = $b;
-mb_convert_variables("euc-jp", "shift_jis", $c);
+mb_convert_variables("EUC-JP", "Shift_JIS", $c);
 debug_zval_dump($b);
 debug_zval_dump($c);
 unset($a);
@@ -43,7 +43,7 @@
 $a = "����������";
 $b = array($a);
 $c = &$b;
-mb_convert_variables("euc-jp", "shift_jis", $c);
+mb_convert_variables("EUC-JP", "Shift_JIS", $c);
 debug_zval_dump($b);
 debug_zval_dump($c);
 unset($a);
@@ -53,7 +53,17 @@
 $a = "����������";
 $b = array(&$a);
 $c = &$b;
-mb_convert_variables("euc-jp", "shift_jis", $c);
+mb_convert_variables("EUC-JP", "Shift_JIS", $c);
+debug_zval_dump($b);
+debug_zval_dump($c);
+unset($a);
+unset($b);
+unset($c);
+
+$a = array(array("����������"));
+$b = $a;
+$c = $b;
+mb_convert_variables("EUC-JP", "Shift_JIS", $c);
 debug_zval_dump($b);
 debug_zval_dump($c);
 unset($a);
@@ -97,4 +107,17 @@
   [0]=>
   string(10) "����������" refcount(2)
 }
-
+array(1) refcount(3){
+  [0]=>
+  array(1) refcount(1){
+    [0]=>
+    string(10) "����������" refcount(1)
+  }
+}
+array(1) refcount(2){
+  [0]=>
+  array(1) refcount(1){
+    [0]=>
+    string(10) "����������" refcount(1)
+  }
+}
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1743&r2=1.1744&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1743 php-src/NEWS:1.1744
--- php-src/NEWS:1.1743 Tue Jun 22 18:21:58 2004
+++ php-src/NEWS        Sat Jun 26 01:39:00 2004
@@ -15,7 +15,8 @@
 - Fixed bug #28702 (SOAP does not parse WSDL service address correctly). (Dmitry)
 - Fixed bug #28699 (Reflection api bugs). (Marcus)
 - Fixed bug #28694 (ReflectionExtension::getFunctions() crashes PHP). (Marcus)
-
+- Fixed bug #28466 (mbstring_convert_variables() array separation problem).
+  (Moriyoshi)
 7 Jun 2004, PHP 5 Release Candidate 3
 - Moved the PDFLib extension to PECL. (Wez)
 - Added MySQL 4.1.2-alpha and 4.1.3-beta support to MySQLI extension. (Georg)

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

Reply via email to