Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ext/json/json.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ PHP_FUNCTION(json_decode)
RETURN_THROWS();
}

if ((options & PHP_JSON_INVALID_UTF8_IGNORE) && (options & PHP_JSON_INVALID_UTF8_SUBSTITUTE)) {
zend_argument_value_error(4, "JSON_INVALID_UTF8_IGNORE and JSON_INVALID_UTF8_SUBSTITUTE are mutually exclusive");
RETURN_THROWS();
}

/* For BC reasons, the bool $assoc overrides the long $options bit for PHP_JSON_OBJECT_AS_ARRAY */
if (!assoc_null) {
if (assoc) {
Expand Down
Loading