Bug #70730 [Opn->Csd]: Incorrect ArrayObject serialization if unset is called in serialize()

From: Date: Sat, 17 Oct 2015 13:07:52 +0000
Subject: Bug #70730 [Opn->Csd]: Incorrect ArrayObject serialization if unset is called in serialize()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196658@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70730&edit=1

 ID:                 70730
 Updated by:         laruence@php.net
 Reported by:        eddielau224 at gmail dot com
 Summary:            Incorrect ArrayObject serialization if unset is
                     called in serialize()
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            SPL related
 Operating System:   Mac OS X Yosemite
 PHP Version:        7.0.0RC5
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e2d6090043aed271d18a4d157cbb64138481c9ed
Log: Fixed bug #70730 (Incorrect ArrayObject serialization if unset is called in serialize())


Previous Comments:
------------------------------------------------------------------------
[2015-10-16 21:47:44] eddielau224 at gmail dot com

Description:
------------
If a class extending ArrayObject overrides serialize() and calls unset() on it's member
variable. It's serialized string will be incorrect. In the test script, the serialized string
will contain 'm:a:1:{}', causing 'Unexpected end of serialized data'.
The test script is working in PHP 5.6

Test script:
---------------
https://3v4l.org/v353G

Expected result:
----------------
Unserialization performed without errors.

Actual result:
--------------
'Unexpected end of serialized data' notice


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=70730&edit=1


Thread (2 messages)

« previous php.bugs (#196658) next »