diff options
Diffstat (limited to 'ext/imap/tests/bug35669.phpt')
-rw-r--r-- | ext/imap/tests/bug35669.phpt | 56 |
1 files changed, 27 insertions, 29 deletions
diff --git a/ext/imap/tests/bug35669.phpt b/ext/imap/tests/bug35669.phpt index fc7a135bce..7a9372d0a0 100644 --- a/ext/imap/tests/bug35669.phpt +++ b/ext/imap/tests/bug35669.phpt @@ -2,45 +2,43 @@ Bug #35669 (imap_mail_compose() crashes with multipart-multiboundary-email) --SKIPIF-- <?php - if (!extension_loaded("imap")) { - die("skip imap extension not available"); - } +extension_loaded('imap') or die('skip imap extension not available in this build'); ?> --FILE-- <?php - $envelope["from"] = 'Santa <somewhere@northpole.gov>'; - $envelope["to"] = 'The bad smurf <bad@smurf.com>'; - $envelope['date'] = 'Wed, 04 Jan 2006 19:24:43 -0500'; +$envelope["from"] = 'Santa <somewhere@northpole.gov>'; +$envelope["to"] = 'The bad smurf <bad@smurf.com>'; +$envelope['date'] = 'Wed, 04 Jan 2006 19:24:43 -0500'; - $multipart["type"] = TYPEMULTIPART; - $multipart["subtype"] = "MIXED"; - $body[] = $multipart; //add multipart stuff +$multipart["type"] = TYPEMULTIPART; +$multipart["subtype"] = "MIXED"; +$body[] = $multipart; //add multipart stuff - $textpart["type"] = TYPEMULTIPART; - $textpart["subtype"] = "ALTERNATIVE"; - $body[] = $textpart; //add body part +$textpart["type"] = TYPEMULTIPART; +$textpart["subtype"] = "ALTERNATIVE"; +$body[] = $textpart; //add body part - $plain["type"] = TYPETEXT; - $plain["subtype"] = "PLAIN"; - $plain["charset"] = "iso-8859-1"; - $plain["encoding"] = ENCQUOTEDPRINTABLE; - $plain["description"] = "Plaintype part of message"; - $plain['disposition'] = "inline"; - $plain["contents.data"] = 'See mom, it will crash'; +$plain["type"] = TYPETEXT; +$plain["subtype"] = "PLAIN"; +$plain["charset"] = "iso-8859-1"; +$plain["encoding"] = ENCQUOTEDPRINTABLE; +$plain["description"] = "Plaintype part of message"; +$plain['disposition'] = "inline"; +$plain["contents.data"] = 'See mom, it will crash'; - $body[] = $plain; //next add plain text part +$body[] = $plain; //next add plain text part - $html["type"] = TYPETEXT; - $html["subtype"] = "HTML"; - $html["charset"] = "iso-8859-1"; - $html["encoding"] = ENCQUOTEDPRINTABLE; - $html["description"] = "HTML part of message"; - $html['disposition'] = "inline"; - $html["contents.data"] = 'See mom, it will <b>crash</b>'; +$html["type"] = TYPETEXT; +$html["subtype"] = "HTML"; +$html["charset"] = "iso-8859-1"; +$html["encoding"] = ENCQUOTEDPRINTABLE; +$html["description"] = "HTML part of message"; +$html['disposition'] = "inline"; +$html["contents.data"] = 'See mom, it will <b>crash</b>'; - $body[] = $html; +$body[] = $html; - echo imap_mail_compose($envelope, $body); +echo imap_mail_compose($envelope, $body); ?> --EXPECTF-- Date: Wed, 04 Jan 2006 19:24:43 -0500 |