Issue Details (XML | Word | Printable)

Key: MDL-15741
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Martin Dougiamas
Reporter: Penny Leach
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

workaround for php bug http://bugs.php.net/bug.php?id=44792

Created: 22/Jul/08 12:12 AM   Updated: 24/Jul/08 04:09 PM
Return to search
Component/s: Events API
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Eloy Lafuente (stronk7), Martin Dougiamas, Penny Leach and Petr Skoda
Security Level: None
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
when serializing php objects that include private and protected member variables, php puts null bytes on either side of an * to denote visibility.

See: http://bugs.php.net/bug.php?id=44792

The workaround as far as I can see is to base64_encode and decode serialized data before sticking it in the database.

I am adding this to the event lib code because I can see that's an obvious place that we're going to be affected by this. Anything that wants to store both state and functionality (eg code) for waking up later is going to probably be affected, so we might eventually want moodle_serialize and moodle_unserialize if we find this to be a more widespread problem.

Another place this is potentially going to affect us is for database sessions. (which according to Petr aren't working in HEAD anyway at the moment)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 24/Jul/08 03:59 PM
adding Petr here to let him know

Petr Skoda added a comment - 24/Jul/08 04:09 PM
my +1 for "standard" moodle_serialize, potential places are:

1/ events
2/ modinfo
3/ blocks config - there could be a problem with bc in backups