From fd7756e46878d5f5b674d13590638df3c336624b Mon Sep 17 00:00:00 2001 From: donal72 Date: Wed, 17 Oct 2007 08:14:47 +0000 Subject: [PATCH] Laying groundwork for more Mnet error reporting --- mnet/xmlrpc/xmlparser.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mnet/xmlrpc/xmlparser.php b/mnet/xmlrpc/xmlparser.php index 066265ff0cb..0c9b9b5ed02 100644 --- a/mnet/xmlrpc/xmlparser.php +++ b/mnet/xmlrpc/xmlparser.php @@ -42,6 +42,7 @@ class mnet_encxml_parser { $this->key_URI = ''; $this->payload_encrypted = false; $this->cipher = array(); + $this->error = array(); return true; } @@ -89,6 +90,13 @@ class mnet_encxml_parser { $p = xml_parse($this->parser, $data); + if ($p == 0) { + // Parse failed + $errcode = xml_get_error_code($this->parser); + $errstring = xml_error_string($errcode); + $this->error[] = array('code' => $errcode, 'string' => $errstring); + } + if (count($this->cipher) > 0) { $this->cipher = array_values($this->cipher); $this->payload_encrypted = true;