|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
35 - 15 = ?
Subscribe to this entry?

 [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: Mon Feb 17 06:01:26 2020 UTC