|  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
 [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-2022 The PHP Group
All rights reserved.
Last updated: Wed Oct 05 02:03:49 2022 UTC