Fix PHP8 warnings

This commit is contained in:
Aleksander Machniak 2021-09-29 18:56:56 +02:00
parent dd6f6ab305
commit 38b103430b
2 changed files with 3 additions and 3 deletions

View file

@ -2391,7 +2391,7 @@ $("#rcmfd_new_category").keypress(function(event) {
} }
// set new organizer identity // set new organizer identity
if ($organizer !== false && $identity) { if ($organizer !== false && !empty($identity)) {
$event['attendees'][$organizer]['name'] = $identity['name']; $event['attendees'][$organizer]['name'] = $identity['name'];
$event['attendees'][$organizer]['email'] = $identity['email']; $event['attendees'][$organizer]['email'] = $identity['email'];
} }
@ -2401,7 +2401,7 @@ $("#rcmfd_new_category").keypress(function(event) {
unset($event['attendees'][$owner]['rsvp']); unset($event['attendees'][$owner]['rsvp']);
} }
// fallback to the selected identity // fallback to the selected identity
else if ($organizer === false && $identity) { else if ($organizer === false && !empty($identity)) {
$event['attendees'][] = [ $event['attendees'][] = [
'role' => 'ORGANIZER', 'role' => 'ORGANIZER',
'name' => $identity['name'], 'name' => $identity['name'],

View file

@ -292,7 +292,7 @@ class Horde_Date
*/ */
public function toDateTime() public function toDateTime()
{ {
$date = new DateTime(null, new DateTimeZone($this->_timezone)); $date = new DateTime('now', new DateTimeZone($this->_timezone));
$date->setDate($this->_year, $this->_month, $this->_mday); $date->setDate($this->_year, $this->_month, $this->_mday);
$date->setTime($this->_hour, $this->_min, $this->_sec); $date->setTime($this->_hour, $this->_min, $this->_sec);
return $date; return $date;