From 777ece84cfd8a32bfe457861d03af32da07d3983 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 29 Sep 2020 05:56:57 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Hypolite Petovan --- src/Protocol/DFRN.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index cfbf12c784..31e6173870 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -1795,9 +1795,9 @@ class DFRN { Logger::notice('Processing suggestions'); - $url = $xpath->query('dfrn:url/text()', $suggestion)->item(0)->nodeValue; + $url = $xpath->evaluate('string(dfrn:url[1]/text())', $suggestion); $cid = Contact::getIdForURL($url); - $note = $xpath->query('dfrn:note/text()', $suggestion)->item(0)->nodeValue; + $note = $xpath->evaluate('string(dfrn:note[1]/text())', $suggestion); return FContact::addSuggestion($importer['importer_uid'], $cid, $importer['id'], $note); } -- 2.39.5