xref: /PHP-8.0/ext/imap/tests/bug75774.phpt (revision ef9359d3)
1--TEST--
2Bug #75774 imap_append HeapCorruction
3--SKIPIF--
4<?php
5extension_loaded('imap') or die('skip imap extension not available in this build');
6?>
7--FILE--
8<?php
9
10$fn = __DIR__ . DIRECTORY_SEPARATOR . "foo75774";
11$var1 = fopen($fn, "w");
12
13try {
14    imap_append($var1, "", "", "", "");
15} catch (\TypeError $e) {
16    echo $e->getMessage() . "\n";
17}
18
19fclose($var1);
20unlink($fn);
21
22?>
23--EXPECTF--
24Warning: imap_append(): Internal date not correctly formatted in %s on line %d
25imap_append(): supplied resource is not a valid imap resource
26