Skip to content

Commit

Permalink
Fix error in Thread->getFromHeader()
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Oct 26, 2024
1 parent e7ec7e7 commit b276cea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,10 @@ public function getHeader($header_name)

public function getFromHeader()
{
preg_match("#From:\s*.*[^\s]*\s*<\s*(.*[^\s])\s*>\s*\n#", $this->headers, $m);
if (empty($this->headers)) {
return '';
}
preg_match("#From:\s*.*[^\s]*\s*<\s*(.*[^\s])\s*>\s*\n#", $this->headers ?? '', $m);
return $m[1] ?? '';
}

Expand Down

0 comments on commit b276cea

Please sign in to comment.