Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-15741

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Events API
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      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)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: