Skip to content

Commit

Permalink
[TASK] Use more compatible JSON encode values
Browse files Browse the repository at this point in the history
Since increasing minimum required PHP version these can be used.
  • Loading branch information
NamelessCoder committed Jan 10, 2015
1 parent f198b9f commit 4c3fcd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Format/Json/EncodeViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected function encodeValue($value, $useTraversableKeys, $preventRecursion, $
$value = $this->recursiveArrayOfDomainObjectsToArray($value, $preventRecursion, $recursionMarker);
$value = $this->recursiveDateTimeToUnixtimeMiliseconds($value, $dateTimeFormat);
};
$json = json_encode($value);
$json = json_encode($value, JSON_HEX_AMP | JSON_HEX_QUOT | JSON_HEX_TAG);
if (JSON_ERROR_NONE !== json_last_error()) {
throw new Exception('The provided argument cannot be converted into JSON.', 1358440181);
}
Expand Down

0 comments on commit 4c3fcd8

Please sign in to comment.