Skip to content

Commit aae63c1

Browse files
authored
Ensure info is an array before processing
1 parent 3b919db commit aae63c1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

lib/Horde/Core/Perms/Ui.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ public function validateAddForm(&$info)
245245
return false;
246246
}
247247

248+
if (!is_array($info)) {
249+
$info = [];
250+
}
248251
$info = $this->_form->getInfo($this->_vars, $info);
249252
return $info;
250253
}
@@ -446,6 +449,9 @@ public function validateEditForm(&$info)
446449
if (!$this->_form->validate($this->_vars)) {
447450
return false;
448451
}
452+
if (!is_array($info)) {
453+
$info = [];
454+
}
449455
$info = $this->_form->getInfo($this->_vars, $info);
450456
if ($this->_type == 'matrix') {
451457
/* Collapse the array for default/guest/creator. */
@@ -514,6 +520,9 @@ public function validateDeleteForm(&$info)
514520

515521
if ($form_submit == Horde_Core_Translation::t('Delete')) {
516522
if ($this->_form->validate($this->_vars)) {
523+
if (!is_array($info)) {
524+
$info = [];
525+
}
517526
return $this->_form->getInfo($this->_vars, $info);
518527
}
519528
} elseif (!empty($form_submit)) {

0 commit comments

Comments
 (0)