Re: svn: /phpdoc/en/trunk/reference/oci8/functions/ oci-error.xml
| From: | Sean Coates | Date: | Fri, 20 Nov 2009 18:06:12 +0000 |
| Subject: | Re: svn: /phpdoc/en/trunk/reference/oci8/functions/ oci-error.xml | ||
| References: | 1 2 3 | Groups: | php.doc.cvs |
| Request: | Send a blank email to doc-cvs+get-5521@lists.php.net to get a copy of this message | ||
>>> $conn = oci_connect("hr", "welcome", "localhost/XE");
>>> if (!$conn) {
>>> $e = oci_error(); // For oci_connect errors do not pass a handle
>>> - echo htmlentities($e['message']);
>>> + trigger_error(htmlentities($e['message']), E_USER_ERROR);
>> This looks wrong, and I really hope it is. I am fairly sure that the
>> error mechanism will do htmlentities() for you.
>> -Hannes
>
> Hi Hannes,
>
> Thanks for checking into this. I really do appreciate having it reviewed.
>
> I retested trigger_error and it does not handle entities. My code is right.
> I tested both CLI and Apache mod just to check there were no hidden differences.
Confirmed on Apache mod + 5.3.1RC4 (==5.3.1). Scary.
S