From aafd81ffd73df047082f004f2d8302d93b49b033 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:24:44 +0100 Subject: [PATCH] Remove array slice reference on method return value. Eclipse complained about the syntax, and since it was the only complaint it had I thought it worth dealing with :-) --- inc/caldav-REPORT-cardquery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/caldav-REPORT-cardquery.php b/inc/caldav-REPORT-cardquery.php index 07b4e6b3..c7a19634 100644 --- a/inc/caldav-REPORT-cardquery.php +++ b/inc/caldav-REPORT-cardquery.php @@ -54,7 +54,8 @@ if ( count($qry_filters) == 0 ) { $qry_limit = -1; // everything $qry_filters_combination='OR'; if ( is_array($qry_filters) ) { - $filters_parent = $xmltree->GetPath('/urn:ietf:params:xml:ns:carddav:addressbook-query/urn:ietf:params:xml:ns:carddav:filter')[0]; + $filters_parent = $xmltree->GetPath('/urn:ietf:params:xml:ns:carddav:addressbook-query/urn:ietf:params:xml:ns:carddav:filter'); + $filters_parent = $filters_parent[0]; // only anyof (OR) or allof (AND) allowed, if missing anyof is default (RFC6352 10.5) if ( $filters_parent->GetAttribute("test") == 'allof' ) { $qry_filters_combination='AND';