From 7b7d30797f391dff813de1ab923c83370b1c6046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 21 Aug 2018 14:05:25 +0200 Subject: [PATCH] fix error when no access to activity in timeline query --- Timeline/TimelineActivityProvider.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Timeline/TimelineActivityProvider.php b/Timeline/TimelineActivityProvider.php index b54fe34b0..a19a659e1 100644 --- a/Timeline/TimelineActivityProvider.php +++ b/Timeline/TimelineActivityProvider.php @@ -101,6 +101,10 @@ class TimelineActivityProvider implements TimelineProviderInterface $role); $associationMapping = $metadataActivity->getAssociationMapping('person'); + if (count($reachableCenters) === 0) { + return 'FALSE = TRUE'; + } + // we start with activities having the person_id linked to person // (currently only context "person" is supported) $whereClause = sprintf('%s = %d',