From c0bf513b8ceab21df29e95ed4aadf1991c68221b Mon Sep 17 00:00:00 2001 From: e107steved Date: Sun, 2 Oct 2011 17:16:16 +0000 Subject: [PATCH] Only try one method to get an XML file - return error if file_get_contents() fails --- e107_handlers/xml_class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php index 7d338af8e..57ec76db3 100644 --- a/e107_handlers/xml_class.php +++ b/e107_handlers/xml_class.php @@ -2,7 +2,7 @@ /* * e107 website system * - * Copyright (C) 2008-2010 e107 Inc (e107.org) + * Copyright (C) 2008-2011 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * @@ -282,11 +282,13 @@ class xmlClass { e107_ini_set('default_socket_timeout', $old_timeout); } - if ($data) + if ($data !== FALSE) { $this->xmlFileContents = $data; return $data; } + $this->error = "File_get_contents(XML) error"; // Fill in more info later + return FALSE; } if (function_exists("curl_init")) {