PHP 4.0 Bug #5699: wrong date format in imap_headers()

From: Date: Thu, 20 Jul 2000 12:56:12 +0000
Subject: PHP 4.0 Bug #5699: wrong date format in imap_headers()
Groups: php.dev 
Request: Send a blank email to php-dev+get-25220@lists.php.net to get a copy of this message
From: vgon@mobilae.ru Operating system: Solaris 7 PHP version: 4.0.1pl2 PHP Bug Type: IMAP related Bug description: wrong date format in imap_headers() imap_headers() should return array of headers of e-mail messages. Each header should include date field. This is code from ext/imap/php_imap.c imap_headers function: mail_date(tmp+11, cache); tmp[18] = ' '; tmp[19] = '\0'; mail_fetchfrom(tmp+19, ... So, only 7 chars are reserved for date. But this is description of mail_date() from imapd-4.5 : "This function accepts a message cache element that contains date information, and writes an IMAP-4 date string, that is, one in form: dd-mmm-yyyy hh:mm:ss +zzzz " So, date field in header string looks like dd-mmm- ( 20-Jul- , for example ) Possible solution: mail_date( tmp+11, cache ); len = strlen( tmp ); tmp[len] = ' ' ; tmp[len+1] = 0; mail_fetchfrom(tmp+len+1 ...

« previous php.dev (#25220) next »