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

 ID:                 62189
 Comment by:         mg at ovos dot at
 Reported by:        mg at ovos dot at
 Summary:            Behavior of serialize has changed
 Status:             Feedback
 Type:               Bug
 Package:            Variables related
 Operating System:   Win64
 PHP Version:        5.4.3
 Block user comment: N
 Private report:     N

 New Comment:

Hello!

I managed to produce a simple testCase, please find it here:
http://pastebin.com/sw1ZwvNv


Previous Comments:
------------------------------------------------------------------------
[2012-05-30 12:14:29] mg at ovos dot at

Hello, I am working on a test script. Please allow me to include it in few 
hours.

------------------------------------------------------------------------
[2012-05-30 12:08:16] cataphr...@php.net

Can you create a short script that reproduces this behavior?

------------------------------------------------------------------------
[2012-05-30 10:10:50] mg at ovos dot at

Description:
------------
There is a difference in output of the same object serialized in PHP 5.4 and 
lower than 5.4. Although I could not create a simple testCase, it seems to be 
related to referencing the same object more than once.

I include an online DIFF of serialize() output from PHP 5.3.8 (left column) and 
PHP 5.4.3 (right column):

http://diffchecker.com/T40k97j7

The object is 100% the same, I am just switching between PHP versions.

As you can see the references to "Placeholder" object with name "Left column 
(Homepage)" are present multiple times in output from 5.3.8, where in output 
from PHP 5.4 it is present just once. All the additional occurences are marked 
as reference (e.g. "r: 204"), but the objects are not re-created after running 
unserialize().
Instead of valid objects, empty arrays are created - this is where the change 
breaks down our application.

I would appreciate any hints on why the output might be different.




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



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

Reply via email to