From 765007abb3f8b89264dea71679c0562b6b1c34f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ou=C5=A1ek?= <melanger@users.noreply.github.com> Date: Thu, 18 Aug 2022 16:49:20 +0200 Subject: [PATCH] fix: skip IdPs without tags prevent undefined index error --- www/idpSearch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/idpSearch.php b/www/idpSearch.php index f3e8732..bb485f8 100644 --- a/www/idpSearch.php +++ b/www/idpSearch.php @@ -43,7 +43,7 @@ if (!empty($_GET['idphint']) && !isset($_GET['index'])) { foreach ($metadata as $entityid => $idpentry) { if (!empty($searchBox['include']['tags'])) { foreach ($searchBox['include']['tags'] as $tag) { - if ($tag === $idpentry['tag']) { + if (!empty($idpentry['tag']) && $tag === $idpentry['tag']) { $filteredMetadata[$entityid] = $idpentry; break; } @@ -75,7 +75,7 @@ if (!empty($_GET['idphint']) && !isset($_GET['index'])) { foreach ($metadata as $entityid => $idpentry) { if (!empty($searchBox['exclude']['tags'])) { foreach ($searchBox['exclude']['tags'] as $tag) { - if ($tag === $idpentry['tag']) { + if (!empty($idpentry['tag']) && $tag === $idpentry['tag']) { unset($metadata[$entityid]); break; } -- GitLab