mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Only try one method to get an XML file - return error if file_get_contents() fails
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* e107 website system
|
* 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
|
* Released under the terms and conditions of the
|
||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
* 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);
|
e107_ini_set('default_socket_timeout', $old_timeout);
|
||||||
}
|
}
|
||||||
if ($data)
|
if ($data !== FALSE)
|
||||||
{
|
{
|
||||||
$this->xmlFileContents = $data;
|
$this->xmlFileContents = $data;
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
$this->error = "File_get_contents(XML) error"; // Fill in more info later
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (function_exists("curl_init"))
|
if (function_exists("curl_init"))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user