mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +00:00
Function renamed
This commit is contained in:
parent
20b25a1acd
commit
34257e78ca
2 changed files with 17 additions and 11 deletions
|
@ -488,13 +488,19 @@ class XML
|
|||
return $first_item->attributes;
|
||||
}
|
||||
|
||||
public static function queryValue($xpath, $search, $context)
|
||||
public static function getFirstValue($xpath, $search, $context)
|
||||
{
|
||||
$result = $xpath->query($search, $context)->item(0)->nodeValue;
|
||||
$result = $xpath->query($search, $context);
|
||||
if (!is_object($result)) {
|
||||
return '';
|
||||
}
|
||||
return $result->nodeValue;
|
||||
|
||||
$first_item = $result->item(0);
|
||||
if (!is_object($first_item)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $first_item->nodeValue;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue