note 77286 added to function.libxml-use-internal-errors

From: Date: Thu, 23 Aug 2007 00:58:27 +0000
Subject: note 77286 added to function.libxml-use-internal-errors
Groups: php.notes 
Request: Send a blank email to php-notes+get-129715@lists.php.net to get a copy of this message
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). ---- Server IP: 203.220.0.234 Probable Submitter: 203.206.209.198 ---- Manual Page -- http://www.php.net/manual/en/function.libxml-use-internal-errors.php Edit -- https://master.php.net/note/edit/77286 Del: integrated -- https://master.php.net/note/delete/77286/integrated Del: useless -- https://master.php.net/note/delete/77286/useless Del: bad code -- https://master.php.net/note/delete/77286/bad+code Del: spam -- https://master.php.net/note/delete/77286/spam Del: non-english -- https://master.php.net/note/delete/77286/non-english Del: in docs -- https://master.php.net/note/delete/77286/in+docs Del: other reasons-- https://master.php.net/note/delete/77286 Reject -- https://master.php.net/note/reject/77286 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129715) next »