note 124101 added to json.constants
| From: | crow at biteme dot com | Date: | Thu, 08 Aug 2019 19:31:33 +0000 |
| Subject: | note 124101 added to json.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-211828@lists.php.net to get a copy of this message | ||
Apparently, defaults have changed as of PHP 7.3.6, as json_decode() now fails on malformed UTF8
where it used to default to accepting it.
So, be aware that if your data isn't always 100% clean, you may need to add
JSON_INVALID_UTF8_IGNORE or JSON_INVALID_UTF8_SUBSTITUTE to avoid getting an error instead of the
array you were expecting.
----
Server IP: 208.43.231.9
Probable Submitter: 82.199.157.54 (proxied: 2604:4080:1311:9781:1c6d:5db5:f487:547c)
----
Manual Page -- http://php.net/manual/en/json.constants.php
Edit -- https://master.php.net/note/edit/124101
Del: integrated -- https://master.php.net/note/delete/124101/integrated
Del: useless -- https://master.php.net/note/delete/124101/useless
Del: bad code -- https://master.php.net/note/delete/124101/bad+code
Del: spam -- https://master.php.net/note/delete/124101/spam
Del: non-english -- https://master.php.net/note/delete/124101/non-english
Del: in docs -- https://master.php.net/note/delete/124101/in+docs
Del: other reasons-- https://master.php.net/note/delete/124101
Reject -- https://master.php.net/note/reject/124101
Search -- https://master.php.net/manage/user-notes.php