+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Basic/Vacation.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function _init()
$vacation->disable = true;
$notify = _("Rule Disabled");
} else {
$notification->push(_("Changes saved."), 'horde.success');
$notify = _("Changes saved.");
}

$ingo_storage->updateRule($vacation);
Expand Down
4 changes: 2 additions & 2 deletions lib/Form/Vacation.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public function validate($vars = null, $canAutoFill = false)
}

if ($this->hasFeature('period')) {
$start = $this->_start->getInfo($vars, $start);
$end = $this->_end->getInfo($vars, $end);
$start = $this->_start->getInfo($vars, []);
$end = $this->_end->getInfo($vars, []);
Comment on lines +105 to +106
Copy link

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing an empty array as the second parameter may not provide the expected default behavior. Consider investigating what the original intent was for the second parameter - it might need a specific default value rather than an empty array.

Suggested change
$start = $this->_start->getInfo($vars, []);
$end = $this->_end->getInfo($vars, []);
$start = $this->_start->getInfo($vars, $this->_errors);
$end = $this->_end->getInfo($vars, $this->_errors);

Copilot uses AI. Check for mistakes.

Comment on lines +105 to +106
Copy link

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing an empty array as the second parameter may not provide the expected default behavior. Consider investigating what the original intent was for the second parameter - it might need a specific default value rather than an empty array.

Suggested change
$start = $this->_start->getInfo($vars, []);
$end = $this->_end->getInfo($vars, []);
$start = $this->_start->getInfo($vars, null);
$end = $this->_end->getInfo($vars, null);

Copilot uses AI. Check for mistakes.

if ($start && $end && $end < $start) {
$valid = false;
$this->_errors['end'] = _("Vacation end date is prior to start.");
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载