Skip to content

Commit

Permalink
fix: use correct object to get option name
Browse files Browse the repository at this point in the history
  • Loading branch information
nfmerijn authored and MAPCMC committed Jun 15, 2023
1 parent 6c7672c commit 4982919
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Services/Forms/Fields/TypeCheckbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function getReadableValue($langurl): string
foreach ($this->properties->options->list as $option) {
// if id is in array value
if (in_array($option->index, $this->getValue())) {
if (isset($option->$langurl)) {
$returnString[] = $option->$langurl;
if (isset($option->option->$langurl)) {
$returnString[] = $option->option->$langurl;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Services/Forms/Fields/TypeDropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public function getReadableValue($langurl): string
continue;
}

if (isset($option->$langurl)) {
$returnString[] = $option->$langurl;
if (isset($option->option->$langurl)) {
$returnString[] = $option->option->$langurl;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/Services/Forms/Fields/TypeRadio.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public function getReadableValue($langurl): string
foreach ($this->properties->options->list as $option) {
// if id is in array value
if (in_array($option->index, $this->getValue())) {
if (isset($option->$langurl)) {
$returnString[] = $option->$langurl;
if (isset($option->option->$langurl)) {
$returnString[] = $option->option->$langurl;
}
}
}
Expand Down

0 comments on commit 4982919

Please sign in to comment.