Ticket #803 (closed defect: fixed)
__sleep() function in TActiveRecord
| Reported by: | short | Owned by: | xue |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.2 |
| Component: | Prado Framework v3 | Version: | 3.1 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
Hi,
there is an inconsistency in PHP's calling of the _ _sleep function on objects, which results in incorrectly omitting serialization of private variables from ancestor classes. Details can be found in this thread in the Prado Forum.
To summarize, there are two problems in TActiveRecord:
- The variable _readOnly is private, and there is a _ _sleep() function present, which results in PHP not serializing the variable when a class derived from TActiveRecord is serialized. It also throws a notice in some cases.
- The _ _wake() function should be called _ _wakeup().
Just removing the _ _sleep() function was remedy for the unwanted notice PHP threw.
Change History
Note: See
TracTickets for help on using
tickets.
