Skip to content

Commit

Permalink
Fix null dereference error in param-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mstilkerich committed Jan 22, 2021
1 parent facb099 commit 1eeecce
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/CardDAV/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1eeecce

Please sign in to comment.