Skip to content

Commit aef9430

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Don't skip test on Windows due to missing ext/posix
2 parents 37b84b7 + 3c10246 commit aef9430

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/standard/tests/mail/gh7875.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
--TEST--
22
GH-7875 (mails are sent even if failure to log throws exception)
3-
--EXTENSIONS--
4-
mail
5-
posix
63
--SKIPIF--
74
<?php
85
$filename = __DIR__ . "/gh7875.mail.log";
@@ -13,7 +10,10 @@ $is_writable = is_writable($filename);
1310
chmod($filename, 0644);
1411
unlink($filename);
1512
if ($is_writable) die("skip cannot make file read-only");
16-
if (posix_geteuid() == 0) die('skip Cannot run test as root.');
13+
if (PHP_OS_FAMILY !== "Windows") {
14+
if (!extension_loaded('posix')) die('skip POSIX extension not loaded');
15+
if (posix_geteuid() == 0) die('skip Cannot run test as root.');
16+
}
1717
?>
1818
--INI--
1919
sendmail_path={MAIL:{PWD}/gh7875.mail.out}

0 commit comments

Comments
 (0)