From 01a721b36a18ef0c431596d4076939ca51b439a6 Mon Sep 17 00:00:00 2001 From: qadan Date: Thu, 14 May 2020 13:45:46 -0300 Subject: [PATCH 1/2] return array --- src/EmbargoesEmbargoesService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EmbargoesEmbargoesService.php b/src/EmbargoesEmbargoesService.php index 65ec040..4081071 100644 --- a/src/EmbargoesEmbargoesService.php +++ b/src/EmbargoesEmbargoesService.php @@ -167,12 +167,12 @@ public function getMediaParentNids($mid) { public function getParentNidsOfFileEntity($file) { $relationships = file_get_file_references($file); if (!$relationships) { - $nids = NULL; + $nids = []; } else { foreach ($relationships as $relationship) { if (!$relationship) { - $nids = NULL; + $nids = []; } else { foreach ($relationship as $key => $value) { From fb8127d0508f55a0fd79bb5bbfa47450aac0dc2b Mon Sep 17 00:00:00 2001 From: qadan Date: Fri, 29 May 2020 12:14:12 -0300 Subject: [PATCH 2/2] more null vs array issues --- src/Entity/EmbargoesEmbargoEntity.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Entity/EmbargoesEmbargoEntity.php b/src/Entity/EmbargoesEmbargoEntity.php index 9cc40ca..6d2b906 100644 --- a/src/Entity/EmbargoesEmbargoEntity.php +++ b/src/Entity/EmbargoesEmbargoEntity.php @@ -52,11 +52,11 @@ class EmbargoesEmbargoEntity extends ConfigEntityBase implements EmbargoesEmbarg protected $expiration_date; - protected $exempt_ips; + protected $exempt_ips = []; - protected $exempt_users; + protected $exempt_users = []; - protected $additional_emails; + protected $additional_emails = []; protected $embargoed_node;