diff --git a/include/class.thread.php b/include/class.thread.php index 34c5e14a694603d859e82ba9f9eb4f165343f832..c4255ac7c27cd76d03d0d73f37731da7f692e116 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -728,7 +728,7 @@ Class ThreadEntry { $subject = $mailinfo['subject']; $match = array(); if ($subject && $mailinfo['email'] - && preg_match("/#[\p{L}-]+?([0-9]{1,10})/u", $subject, $match) + && preg_match("/#(?:[\p{L}-]+)?([0-9]{1,10})/u", $subject, $match) && ($tid = Ticket::getIdByExtId((int)$match[1], $mailinfo['email'])) ) // Return last message for the thread