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

From: Date: Fri, 20 Nov 2009 18:01:24 +0000
Subject: Re: svn: /phpdoc/en/trunk/reference/oci8/functions/ oci-error.xml
References: 1 2  Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5520@lists.php.net to get a copy of this message
Hannes Magnusson wrote:
On Tue, Nov 17, 2009 at 00:08, Christopher Jones <sixd@php.net> wrote:
sixd                                     Mon, 16 Nov 2009 23:08:26 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290849 Log: Use trigger_error() in examples for consistency Changed paths: U phpdoc/en/trunk/reference/oci8/functions/oci-error.xml Modified: phpdoc/en/trunk/reference/oci8/functions/oci-error.xml ===================================================================
--- phpdoc/en/trunk/reference/oci8/functions/oci-error.xml      2009-11-16 23:04:13 UTC (rev 290848)
+++ phpdoc/en/trunk/reference/oci8/functions/oci-error.xml      2009-11-16 23:08:26 UTC (rev 290849)
@@ -132,7 +132,7 @@ $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. Chris -- Blog: http://blogs.oracle.com/opal Twitter: http://twitter.com/ghrd

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