Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2320

Remove empty string key replacement logic in json_canonicalize()

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 1.18.0
    • Affects Version/s: None
    • Component/s: None
    • None

      The json_canonicalize() test utility function still has the following code in place:

      /* Versions of PHP before 7.1 replace empty JSON keys with "_empty_" when
       * decoding to a stdClass (see: https://bugs.php.net/bug.php?id=46600). Work
       * around this by replacing "_empty_" keys before returning.
       */
      $json = str_replace('"_empty_":', '"":', $json);
      

      This can be removed since we no longer test on those PHP versions.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: