Skip to content

Commit

Permalink
fix if valueAttributes are not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Feb 15, 2025
1 parent 4dae170 commit c141f45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adm_program/system/classes/HtmlForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ public function addSelectBox(string $id, string $label, array $values, array $op
}

// if special value attributes are set then add them to the values array
if(count($optionsAll['valueAttributes']) > 0) {
if(is_array($optionsAll['valueAttributes']) && count($optionsAll['valueAttributes']) > 0) {
foreach($valuesArray as &$valueArray) {
if (isset($optionsAll['valueAttributes'][$valueArray['id']])) {
foreach($optionsAll['valueAttributes'][$valueArray['id']] as $key => $value) {
Expand Down

0 comments on commit c141f45

Please sign in to comment.