Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • mahara mahara
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • maharamahara
  • maharamahara
  • Repository
Switch branch/tag
  • mahara
  • htdocs
  • import
  • leap
  • lib.php
Find file BlameHistoryPermalink
  • Nigel McNie's avatar
    Ensure all config values for LEAP2A export/import are json_encoded in wrapper arrays. · d7b595ab
    Nigel McNie authored Oct 22, 2009
    It turns out I was relying on a nasty behaviour quirk of json_decode in PHP,
    namely that it'll just pass strings through - in some cases. This is horribly
    out of touch with the JSON specification, see these PHP bugs:
    
    http://bugs.php.net/bug.php?id=38680 (where they broke it)
    http://bugs.php.net/bug.php?id=46518
    
     (people complaining about it)
    
    The solution is to wrap all configuration fields when exporting as LEAP in an
    array and then json_encode that. json_decode will handle that properly in all
    versions of PHP.
    
    Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
    d7b595ab