Zend: Fix `array_walk_recursive` pass by reference error on PHP8

refs #4287
This commit is contained in:
Johannes Meyer 2021-06-02 11:24:01 +02:00
parent e794967389
commit 6e3ad08aef
1 changed files with 3 additions and 1 deletions

View File

@ -598,7 +598,9 @@ class Zend_Form_Element implements Zend_Validate_Interface
$valueFiltered = $this->_value;
if ($this->isArray() && is_array($valueFiltered)) {
array_walk_recursive($valueFiltered, array($this, '_filterValue'));
array_walk_recursive($valueFiltered, function (&$val, $key) {
$this->_filterValue($val, $key);
});
} else {
$this->_filterValue($valueFiltered, $valueFiltered);
}