Re: svn: /phpdoc/en/trunk/reference/oci8/functions/ oci-error.xml

From: Date: Fri, 20 Nov 2009 18:09:22 +0000
Subject: Re: svn: /phpdoc/en/trunk/reference/oci8/functions/ oci-error.xml
References: 1 2 3 4  Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5522@lists.php.net to get a copy of this message
On Fri, Nov 20, 2009 at 19:06, Sean Coates <sean@seancoates.com> wrote: >>>> $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. Ouhhhcrap. I'll need to fix some of my code then :P -Hannes

« previous php.doc.cvs (#5522) next »