]> granicus.if.org Git - php/commitdiff
Renamed test case to match with reported bug
authorJuan Basso <jrbasso@gmail.com>
Tue, 10 Mar 2015 04:01:26 +0000 (00:01 -0400)
committerStanislav Malyshev <stas@php.net>
Mon, 23 Mar 2015 03:34:59 +0000 (20:34 -0700)
NEWS
ext/standard/tests/serialize/bug69210.phpt [moved from ext/standard/tests/serialize/serialization_objects_016.phpt with 100% similarity]
ext/standard/var.c

diff --git a/NEWS b/NEWS
index 2effd62701bf84a7cad668015f58230df2d4d34b..8bebcd3eeeb0435e4e03f0875cc9a80bf84241c7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ PHP                                                                        NEWS
   . Fixed bug #69134 (Per Directory Values overrides PHP_INI_SYSTEM
     configuration options). (Anatol Belski)
   . Fixed bug #69207 (move_uploaded_file allows nulls in path). (Stas)
+  . Fixed bug #69210 (serialize function return corrupted data when sleep has
+    non-string values). (Juan Basso)
   . Fixed bug #69212 (Leaking VIA_HANDLER func when exception thrown in
     __call/... arg passing). (Nikita)
   . Fixed bug #69221 (Segmentation fault when using a generator in combination
index 557d71cb372ead03479ed3e4f732eaf169756ab5..3f2c0d78875a2ffe22324af8832559987155f2d5 100644 (file)
@@ -658,7 +658,7 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
 
                        if (Z_TYPE_PP(name) != IS_STRING) {
                                php_error_docref(NULL TSRMLS_CC, E_NOTICE, "__sleep should return an array only containing the names of instance-variables to serialize.");
-                               convert_to_string(name);
+                               convert_to_string(*name);
                        }
                        propers = Z_OBJPROP_P(struc);
                        if (zend_hash_find(propers, Z_STRVAL_PP(name), Z_STRLEN_PP(name) + 1, (void *) &d) == SUCCESS) {