|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70390 Invalid object size in serialized string
Submitted: 2015-08-29 16:29 UTC Modified: 2015-08-29 17:18 UTC
From: alec at alec dot pl Assigned: cmb (profile)
Status: Duplicate Package: Unknown/Other Function
PHP Version: 7.0.0RC1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: alec at alec dot pl
New email:
PHP Version: OS:


 [2015-08-29 16:29 UTC] alec at alec dot pl
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:

class test
    public $prop;

$test = new test;
$test->unknown = '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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-29 17:18 UTC]
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-08-29 17:18 UTC]
This is a duplicate of bug #70187, which has already been fixed in
latest master.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Feb 22 10:01:25 2020 UTC