Remove empty string key replacement logic in json_canonicalize()

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Trivial - P5
    • 1.18.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: