php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35779 private members are not serialized properly
Submitted: 2005-12-22 22:39 UTC Modified: 2005-12-30 01:00 UTC
From: romdisc at gmx dot net Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.1.1 OS: Linux-2.6.8
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-12-22 22:39 UTC] romdisc at gmx dot net
Description:
------------
Hello,

** my system: debian apache2 php module 5.0.5-3

this is a variation of bug 26737!
My superclass of ProductItem implements a private members. Those are not covered with the fix of bug 26737.

Last 2 lines (__vat, __vatMode) of 'Actual Result' are inherited from superclass. __wakeup() ignores given values if present.

Here is snaps:hot from sess_file:
O:11:"ProductItem":4:{s:13:"^@*^@__quantity";i:5;s:5:"__vat";N;
s:9:"__vatMode";R:3;s:17:"^@ProductItem^@__id";i:5044;}



Reproduce code:
---------------
// investigate your session file

Expected result:
----------------
ProductItem Object
(
    [__id:private] => 5044
    [__product:private] => 
    [__vat:private] => 
    [__vatMode:private] => 
    [__quantity:protected] => 5
)


Actual result:
--------------
ProductItem Object
(
    [__id:private] => 5044
    [__product:private] => 
    [__vat:private] => 
    [__vatMode:private] => 
    [__quantity:protected] => 5
    [__vat] => 
    [__vatMode] => 
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-22 22:41 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2005-12-30 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC