Skip to content

Commit 215956d

Browse files
authored
PHPC-2320: Remove pre-7.1 logic in json_canonicalize() (#1500)
1 parent b272fe2 commit 215956d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

tests/utils/tools.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,6 @@ function json_canonicalize($json)
453453
{
454454
$json = json_encode(json_decode($json));
455455

456-
/* Versions of PHP before 7.1 replace empty JSON keys with "_empty_" when
457-
* decoding to a stdClass (see: https://bugs.php.net/bug.php?id=46600). Work
458-
* around this by replacing "_empty_" keys before returning.
459-
*/
460-
$json = str_replace('"_empty_":', '"":', $json);
461-
462456
/* Canonicalize string values for $numberDouble to ensure they are converted
463457
* the same as number literals in legacy and relaxed output. This is needed
464458
* because the printf format in _bson_as_json_visit_double uses a high level

0 commit comments

Comments
 (0)