Re: json_encode() behavior for incorrectly encoded strings
| From: | Daniel Convissor | Date: | Thu, 21 Jun 2012 14:12:41 +0000 |
| Subject: | Re: json_encode() behavior for incorrectly encoded strings | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-60923@lists.php.net to get a copy of this message | ||
Hi Nikita:
> PHP <= 5.3.13, PHP 5.4, master behave as follows when an invalid UTF-8
> string is encountered:
> * A warning is thrown, but only if display_errors=off
So the warning is put into the error log? But only if display_errors is
off? And if display_errors is on, no warning is produced?
That's very counter-intuitive and un-PHP-like. Someone mentioned it's for
security reasons. By that logic, we should get rid of all error
messages because they all reveal some information that can be used by
attackers.
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335