Skip to content

Commit

Permalink
Merge pull request Shardj#460 from t-gebauer/fix-form-element-replace…
Browse files Browse the repository at this point in the history
…-null

Fix str_replace null in Zend_Form_Element::_getErrorMessages()
  • Loading branch information
develart-projects authored Nov 28, 2024
2 parents 66c65b8 + 4787755 commit 074fb82
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 074fb82

Please sign in to comment.