Merge pull request #4808 from Icinga/fix/strpos-null-Zend_Form-dissolveArrayValue

Avoid passing null as hastack to `strpos` in library/vendor/Zend/Form::_dissolveArrayValue()
This commit is contained in:
Johannes Meyer 2022-06-07 15:10:34 +02:00 committed by GitHub
commit e3219be4fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2109,7 +2109,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
protected function _dissolveArrayValue($value, $arrayPath)
{
// As long as we have more levels
while ($arrayPos = strpos($arrayPath, '[')) {
while ($arrayPos = strpos($arrayPath ?? '', '[')) {
// Get the next key in the path
$arrayKey = trim(substr($arrayPath, 0, $arrayPos), ']');