Skip to content

Commit 298f0fb

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: Make gh7875.phpt more resilient
2 parents c25b23f + d2ec5be commit 298f0fb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ext/standard/tests/mail/gh7875.phpt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
--TEST--
22
GH-7875 (mails are sent even if failure to log throws exception)
3+
--SKIPIF--
4+
<?php
5+
$filename = __DIR__ . "/gh7875.mail.log";
6+
touch($filename);
7+
chmod($filename, 0444);
8+
clearstatcache();
9+
$is_writable = is_writable($filename);
10+
chmod($filename, 0644);
11+
unlink($filename);
12+
if ($is_writable) die("skip cannot make file read-only");
13+
?>
314
--INI--
415
sendmail_path={MAIL:{PWD}/gh7875.mail.out}
516
mail.log={PWD}/gh7875.mail.log

0 commit comments

Comments
 (0)