X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FXML.php;h=963161fbffb2add74f70d8874380a795800e6a1e;hb=8dc0ab9bb3379fec0be442160db1ae29ef8cea9d;hp=e8eb4233b1a8a3040da04da6b68cb02c7aaadc50;hpb=322b7c856ca9ba53bd9c7da50dd5c1e3c9197d56;p=friendica.git diff --git a/src/Util/XML.php b/src/Util/XML.php index e8eb4233b1..963161fbff 100644 --- a/src/Util/XML.php +++ b/src/Util/XML.php @@ -250,7 +250,7 @@ class XML * Examples: $array = Xml::toArray(file_get_contents('feed.xml')); * $array = Xml::toArray(file_get_contents('feed.xml', true, 1, 'attribute')); * - * @param object $contents The XML text + * @param string $contents The XML text * @param boolean $namespaces True or false include namespace information * in the returned array as array elements. * @param integer $get_attributes 1 or 0. If this is 1 the function will get the attributes as well as the tag values - @@ -475,7 +475,7 @@ class XML public static function getFirstAttributes(DOMXPath $xpath, $element, $context = null) { - $result = $xpath->query($element, $context); + $result = @$xpath->query($element, $context); if (!is_object($result)) { return false; } @@ -490,7 +490,7 @@ class XML public static function getFirstValue($xpath, $search, $context) { - $result = $xpath->query($search, $context); + $result = @$xpath->query($search, $context); if (!is_object($result)) { return ''; }