From 1eeecce4fd8274886eb2e6ab361f74cbba0e4da7 Mon Sep 17 00:00:00 2001 From: Michael Stilkerich Date: Fri, 22 Jan 2021 16:58:33 +0100 Subject: [PATCH] Fix null dereference error in param-filter --- lib/CardDAV/Plugin.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/CardDAV/Plugin.php b/lib/CardDAV/Plugin.php index 09d1f593da..7097c8569b 100644 --- a/lib/CardDAV/Plugin.php +++ b/lib/CardDAV/Plugin.php @@ -587,7 +587,14 @@ protected function validateParamFilters(array $vProperties, array $filters, $tes foreach ($vProperties as $vProperty) { // If we got all the way here, we'll need to validate the // text-match filter. - $success = DAV\StringUtil::textMatch($vProperty[$filter['name']]->getValue(), $filter['text-match']['value'], $filter['text-match']['collation'], $filter['text-match']['match-type']); + if (isset($vProperty[$filter['name']])) { + $success = DAV\StringUtil::textMatch( + $vProperty[$filter['name']]->getValue(), + $filter['text-match']['value'], + $filter['text-match']['collation'], + $filter['text-match']['match-type'] + ); + } if ($success) { break; }