diff --git a/src/Controller/IpRangeAccessExemptionController.php b/src/Controller/IpRangeAccessExemptionController.php index 99f015b..03e04fe 100644 --- a/src/Controller/IpRangeAccessExemptionController.php +++ b/src/Controller/IpRangeAccessExemptionController.php @@ -46,9 +46,8 @@ public static function create(ContainerInterface $container) { public function response() { $ranges = []; $cache_tags = []; - $resources = (array) $this->request->query->get('resources', []); /** @var \Drupal\embargo\IpRangeInterface[] $entities */ - $entities = $this->entityTypeManager()->getStorage('embargo_ip_range')->loadMultiple((array) $this->request->query->get('ranges', [])); + $entities = $this->entityTypeManager()->getStorage('embargo_ip_range')->loadMultiple($this->request->query->all()['ranges'] ?? []); foreach ($entities as $entity) { $ranges[] = [ 'label' => $entity->label(), @@ -59,7 +58,7 @@ public function response() { return [ '#theme' => 'embargo_ip_access_exemption', - '#resources' => $resources, + '#resources' => $this->request->query->all()['resources'] ?? [], '#ranges' => $ranges, '#contact_email' => $this->config('embargo.settings')->get('contact_email'), '#cache' => [