Skip to content

Commit 7359a42

Browse files
committed
fix: getInfo() no longer writes back to second parameter. Use return value. (occurence found by Dmitry)
1 parent db886a5 commit 7359a42

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/Basic/Vacation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function _init()
5050
/* Perform requested actions. Ingo_Form_Vacation does token checking
5151
* for us. */
5252
if ($form->validate($this->vars)) {
53-
$form->getInfo($this->vars, $info);
53+
$info = $form->getInfo($this->vars, $info);
5454
$vacation->addresses = $info['addresses'] ?? '';
5555
$vacation->days = $info['days'];
5656
$vacation->exclude = $info['excludes'];

lib/Form/Vacation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ public function validate($vars = null, $canAutoFill = false)
102102
}
103103

104104
if ($this->hasFeature('period')) {
105-
$this->_start->getInfo($vars, $start);
106-
$this->_end->getInfo($vars, $end);
105+
$start = $this->_start->getInfo($vars, $start);
106+
$end = $this->_end->getInfo($vars, $end);
107107
if ($start && $end && $end < $start) {
108108
$valid = false;
109109
$this->_errors['end'] = _("Vacation end date is prior to start.");

0 commit comments

Comments
 (0)