Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
Bug #14779  Proper header-body separator for empty attachment
3
--SKIPIF--
4
--FILE--
5
<?php
6
error_reporting(E_ALL); // ignore E_STRICT
7
include "Mail/mime.php";
8
 
9
$m = new Mail_mime();
10
$m->addAttachment('', "text/plain", 'file.txt', FALSE, 'base64', 'attachment');
11
$result = $m->get();
12
 
13
if (preg_match('/(Content.*)--=.*/s', $result, $matches)) {
14
    print_r($matches[1]."END");
15
}
16
 
17
?>
18
--EXPECT--
19
Content-Transfer-Encoding: base64
20
Content-Type: text/plain;
21
 name=file.txt
22
Content-Disposition: attachment;
23
 filename=file.txt
24
 
25
 
26
END