Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Laying groundwork for more Mnet error reporting

  • Loading branch information...
commit b3225d1a2ffab332e7e39fbf33bdcc01421b015d 1 parent d029c12
donal72 authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 mnet/xmlrpc/xmlparser.php
View
8 mnet/xmlrpc/xmlparser.php
@@ -42,6 +42,7 @@ function initialise() {
$this->key_URI = '';
$this->payload_encrypted = false;
$this->cipher = array();
+ $this->error = array();
return true;
}
@@ -89,6 +90,13 @@ function parse($data) {
$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;
Please sign in to comment.
Something went wrong with that request. Please try again.