aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CardDAV/Plugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/lib/CardDAV/Plugin.php')
-rw-r--r--vendor/sabre/dav/lib/CardDAV/Plugin.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/vendor/sabre/dav/lib/CardDAV/Plugin.php b/vendor/sabre/dav/lib/CardDAV/Plugin.php
index 09d1f593d..c2d31d9df 100644
--- a/vendor/sabre/dav/lib/CardDAV/Plugin.php
+++ b/vendor/sabre/dav/lib/CardDAV/Plugin.php
@@ -587,14 +587,21 @@ class Plugin extends DAV\ServerPlugin
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 ($filter['text-match']['negate-condition']) {
+ $success = !$success;
+ }
+ }
if ($success) {
break;
}
}
- if ($filter['text-match']['negate-condition']) {
- $success = !$success;
- }
} // else
// There are two conditions where we can already determine whether
@@ -628,15 +635,15 @@ class Plugin extends DAV\ServerPlugin
$success = false;
foreach ($texts as $haystack) {
$success = DAV\StringUtil::textMatch($haystack, $filter['value'], $filter['collation'], $filter['match-type']);
+ if ($filter['negate-condition']) {
+ $success = !$success;
+ }
// Breaking on the first match
if ($success) {
break;
}
}
- if ($filter['negate-condition']) {
- $success = !$success;
- }
if ($success && 'anyof' === $test) {
return true;