mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 01:54:12 +02:00
PHP7 fixes
This commit is contained in:
@@ -452,7 +452,7 @@ class xmlClass
|
||||
*
|
||||
* @param string $xml [optional]
|
||||
* @param boolean $simple [optional] false - use xml2array(), true - use xml_convert_to_array()
|
||||
* @return string
|
||||
* @return array|string
|
||||
*/
|
||||
function parseXml($xmlData = '', $simple = true)
|
||||
{
|
||||
@@ -478,7 +478,14 @@ class xmlClass
|
||||
);
|
||||
|
||||
$xmlData = str_replace(array_keys($extendedTypes), array_values($extendedTypes), $xmlData);
|
||||
|
||||
|
||||
if(strpos($xmlData,'<html lang=')!==false)
|
||||
{
|
||||
$this->errors = "HTML cannot be parsed as XML";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(!$xml = simplexml_load_string($xmlData, 'SimpleXMLElement', LIBXML_NOCDATA))
|
||||
{
|
||||
$this->errors = $this->getErrors($xmlData);
|
||||
|
Reference in New Issue
Block a user