Skip to content

Commit

Permalink
Fix str_replace null in Zend_Form_Element::_getErrorMessages()
Browse files Browse the repository at this point in the history
  • Loading branch information
t-gebauer committed Nov 28, 2024
1 parent 66c65b8 commit 4787755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Form/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ protected function _getErrorMessages()
} elseif ($this->isArray() || is_array($value)) {
$aggregateMessages = [];
foreach ($value as $val) {
$aggregateMessages[] = str_replace('%value%', $val, $message);
$aggregateMessages[] = str_replace('%value%', (string) $val, $message);
}
$aggregateMessages = array_unique($aggregateMessages); //prevent repeating the identical error message for multichoice-items
if (count($aggregateMessages)) {
Expand Down

0 comments on commit 4787755

Please sign in to comment.