Skip to content

Commit

Permalink
prevent accessing empty array when using php 7.4, closes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
superextinct committed Sep 3, 2020
1 parent ab2265d commit 0af493f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hfg/portfolios",
"description": "Connect to Kirby Portfolios.",
"type": "craft-plugin",
"version": "1.0.2",
"version": "1.1",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/fields/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function getInputHtml($value, ElementInterface $element = null): string
'portfolios/_components/fields/Projects_input',
[
'name' => $this->handle,
'value' => $value["projects"],
'value' => (isset($value["projects"]) ? $value["projects"] : []),
'field' => $this,
'id' => $id,
'namespacedId' => $namespacedId,
Expand Down

0 comments on commit 0af493f

Please sign in to comment.