Bug #70390 [Opn->Dup]: Invalid object size in serialized string
| From: | cmb@php.net | Date: | Sat, 29 Aug 2015 17:18:07 +0000 |
| Subject: | Bug #70390 [Opn->Dup]: Invalid object size in serialized string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195621@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70390&edit=1
ID: 70390
Updated by: cmb@php.net
Reported by: alec at alec dot pl
Summary: Invalid object size in serialized string
-Status: Open
+Status: Duplicate
Type: Bug
Package: Unknown/Other Function
Operating System: Linux
PHP Version: 7.0.0RC1
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This is a duplicate of bug #70187, which has already been fixed in
latest master.
Previous Comments:
------------------------------------------------------------------------
[2015-08-29 16:29:00] alec at alec dot pl
Description:
------------
Number of properties of serialized object is wrong after setting unknown property and unsetting an
existing one. This causes that the object can't be unserialized. See test script.
Test script:
---------------
<?php
class test
{
public $prop;
}
$test = new test;
$test->unknown = 'test';
unset($test->prop);
print_r(unserialize(serialize($test)));
Expected result:
----------------
test Object
(
[unknown] => test
)
Actual result:
--------------
PHP Notice: unserialize(): Unexpected end of serialized data in test.php on line 17
PHP Notice: unserialize(): Error at offset 39 of 40 bytes in test.php on line 17
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70390&edit=1