mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Laying groundwork for more Mnet error reporting
This commit is contained in:
parent
4ce054f348
commit
fd7756e468
1 changed files with 8 additions and 0 deletions
|
@ -42,6 +42,7 @@ class mnet_encxml_parser {
|
||||||
$this->key_URI = '';
|
$this->key_URI = '';
|
||||||
$this->payload_encrypted = false;
|
$this->payload_encrypted = false;
|
||||||
$this->cipher = array();
|
$this->cipher = array();
|
||||||
|
$this->error = array();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,6 +90,13 @@ class mnet_encxml_parser {
|
||||||
|
|
||||||
$p = xml_parse($this->parser, $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) {
|
if (count($this->cipher) > 0) {
|
||||||
$this->cipher = array_values($this->cipher);
|
$this->cipher = array_values($this->cipher);
|
||||||
$this->payload_encrypted = true;
|
$this->payload_encrypted = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue