From 0fda16e7132b57fd4852821f8e70cdc2d4159c92 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 14 Sep 2017 12:07:30 -0700 Subject: [PATCH] Added lastErrorMessage() method to XML class. --- e107_admin/lancheck.php | 6 +++++- e107_handlers/xml_class.php | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/e107_admin/lancheck.php b/e107_admin/lancheck.php index 9648c772e..2344567fd 100644 --- a/e107_admin/lancheck.php +++ b/e107_admin/lancheck.php @@ -864,7 +864,7 @@ class lancheck $languages = array(); - if($rawData = $xml -> loadXMLfile($feed, TRUE)) + if($rawData = $xml -> loadXMLfile($feed, true)) { if(empty($rawData['language'])) @@ -894,6 +894,10 @@ class lancheck } + else + { + e107::getDebug()->log("Language Pack Feed Failed: ".$xml->getLastErrorMessage()); + } return $languages; diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php index 514508f0a..b93e2eb71 100644 --- a/e107_handlers/xml_class.php +++ b/e107_handlers/xml_class.php @@ -441,7 +441,7 @@ class xmlClass { $_file = e107::getFile(); $this->xmlFileContents = $_file->getRemoteContent($address, array('timeout' => $timeout, 'post' => $postData)); - $this->error = $_file->getErrorMessage(); + $this->errors = $_file->getErrorMessage(); return $this->xmlFileContents; @@ -1230,7 +1230,10 @@ class xmlClass - + public function getLastErrorMessage() + { + return $this->errors; + }