note 77285 deleted from function.libxml-get-last-error by nlopess

From: Date: Sat, 01 Sep 2007 12:09:53 +0000
Subject: note 77285 deleted from function.libxml-get-last-error by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130021@lists.php.net to get a copy of this message
Note Submitter: Paul Annesley ---- Note that the libxml error buffer can persist between HTTP requests. This seems to affect libxml_get_last_error() but not libxml_get_errors(). The former can return an error object while the latter is an empty array. lib_xml_get_last_error() will happily return errors from a previous HTTP request, even if lib_xml_get_errors() is empty. This includes errors handled by PHP due to libxml_use_internal_errors() being set to false. If you using libxml_use_internal_errors() to expect and handle an XML error, you should always call libxml_clear_errors() as well. Tested against mod_php 5.2.3 (DSO) under Apache 2.0.52 (Linux).

« previous php.notes (#130021) next »