6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/29/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#13409] IMP dies on bad date headers
*
Your Email Address
*
Spam protection
Enter the letters below:
._.\ / __ .__ .___. | >< / `| \ _/ _|_/ \\__.|__/./__.
Comment
>> I have a user, converted from another mail application to Horde, who >> complains about not being able to read his mails. >> When he tries to access some of them, he gets server communication error. >> >> The following are in the logs: >> Jul 31 16:47:26 wm Webmail: [imp] PHP ERROR: strftime() expects >> parameter 2 to be long, string given [pid 79051 on line 178 of >> "/usr/local/www/webmail/web/imp/lib/Message/Ui.php"] >> Jul 31 16:47:26 wm Webmail: PHP Fatal error: Call to a member >> function format() on a non-object in >> /usr/local/www/webmail/web/imp/lib/Message/Ui.php on line 181 >> >> Putting some debug syslogs around this code it seems >> $this->_envelope->date becomes an empty string when the date header >> is invalid. >> Two examples from the user's folder: >> Date: Tue, 22 Oct 2013 19:02:07 +0200 (GMT+02:00) >> Date: Wed, 02 Jul 2014 05:18:27 UT >> >> If I correct these headers to be RFC conform, the messages can be read. >> Thunderbird and other clients can show these correctly. > After reading my own message: "around this code" really means > imp/lib/Ajax/Application/ShowMessage.php and this loop: > /* Build the rest of the headers. */ > foreach ($headers_list as $head => $str) { > if ($val = $mime_headers->getValue($head)) { > if ($head == 'date') { > /* Add local time to date header. */ > $val = > htmlspecialchars($imp_ui->getLocalTime($this->_envelope->date)); > > $this->_envelope->date here is an empty string on bad date headers, > that's where getLocalTime dies.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers