|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-08-29 17:18 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2015-08-29 17:18 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
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