Skip to content

Commit

Permalink
do not pass null in as the last argument to str_replace (PHP8.1 does …
Browse files Browse the repository at this point in the history
…not like this)
  • Loading branch information
DavidGoodwin committed Dec 4, 2022
1 parent 667de09 commit b27001c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions model/AliasHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,11 @@ protected function _missing_domain($field) {
* @return string an email alias.
*/
protected function getVacationAlias() {
$vacation_goto = str_replace('@', '#', $this->id);
return $vacation_goto . '@' . Config::read_string('vacation_domain');
if ($this->id !== null) {
$vacation_goto = str_replace('@', '#', $this->id);
return $vacation_goto . '@' . Config::read_string('vacation_domain');
}
return "unknown@" . Config::read_string('vacation_domain');
}

/**
Expand Down

0 comments on commit b27001c

Please sign in to comment.