note 77285 added to function.libxml-get-last-error

From: Date: Thu, 23 Aug 2007 00:57:34 +0000
Subject: note 77285 added to function.libxml-get-last-error
Groups: php.notes 
Request: Send a blank email to php-notes+get-129714@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-get-last-error.php Edit -- https://master.php.net/note/edit/77285 Del: integrated -- https://master.php.net/note/delete/77285/integrated Del: useless -- https://master.php.net/note/delete/77285/useless Del: bad code -- https://master.php.net/note/delete/77285/bad+code Del: spam -- https://master.php.net/note/delete/77285/spam Del: non-english -- https://master.php.net/note/delete/77285/non-english Del: in docs -- https://master.php.net/note/delete/77285/in+docs Del: other reasons-- https://master.php.net/note/delete/77285 Reject -- https://master.php.net/note/reject/77285 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129714) next »