note 102871 added to function.htmlspecialchars
| From: | pinkgothic at gmail dot com | Date: | Fri, 11 Mar 2011 13:00:20 +0000 |
| Subject: | note 102871 added to function.htmlspecialchars | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177789@lists.php.net to get a copy of this message | ||
Please note that this function results in an E_WARNING when display_errors is off and an invalid
multibyte string is passed to it (e.g. with 'utf-8' as the encoding parameter and broken
utf-8 characters somewhere in the string).
This is ESPECIALLY IMPORTANT if you have an EXCEPTION-THROWING ERROR HANDLER, since even though you
can't reproduce it in a development mode where display_errors is on, you MUST wrap your
function call in a try-catch, or your application will crash.
[ The reason PHP makes this distinction is because this is a core function and many production
servers are misconfigured to have display_errors on (to prevent such things as path disclosure from
error messages from accidentally cropping up). See: http://bugs.php.net/bug.php?id=47494 ]
----
Server IP: 212.124.37.9
Probable Submitter: 80.153.202.193
----
Manual Page -- http://www.php.net/manual/en/function.htmlspecialchars.php
Edit -- https://master.php.net/note/edit/102871
Del: integrated -- https://master.php.net/note/delete/102871/integrated
Del: useless -- https://master.php.net/note/delete/102871/useless
Del: bad code -- https://master.php.net/note/delete/102871/bad+code
Del: spam -- https://master.php.net/note/delete/102871/spam
Del: non-english -- https://master.php.net/note/delete/102871/non-english
Del: in docs -- https://master.php.net/note/delete/102871/in+docs
Del: other reasons-- https://master.php.net/note/delete/102871
Reject -- https://master.php.net/note/reject/102871
Search -- https://master.php.net/manage/user-notes.php