Skip to content

Commit

Permalink
Merge pull request #3 from qadan/null-check
Browse files Browse the repository at this point in the history
Null check
  • Loading branch information
adam-vessey authored Jun 22, 2020
2 parents b472870 + fb8127d commit 320a098
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/EmbargoesEmbargoesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/Entity/EmbargoesEmbargoEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 320a098

Please sign in to comment.