Skip to content

Commit af15ed9

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Ignore optional warning output in test
2 parents 98e2ff4 + 6aa2095 commit af15ed9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

sapi/cli/tests/bug80092.phpt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,21 @@ $cmd = [
2525
];
2626

2727
$proc = proc_open($cmd, [['null'], ['pipe', 'w'], ['redirect', 1]], $pipes);
28-
echo stream_get_contents($pipes[1]);
28+
$output = stream_get_contents($pipes[1]);
29+
30+
// Ignore warnings if opcache loads twice or duplicate modules are loaded by searching for the preloaded marker
31+
$flag = false;
32+
foreach (explode("\n", $output) as $line) {
33+
if ($line === "preloaded") {
34+
$flag = true;
35+
}
36+
if ($flag) {
37+
echo $line, "\n";
38+
}
39+
}
2940

3041
?>
3142
--EXPECTF--
32-
%A
3343
preloaded
3444
PHP %s
3545
Copyright (c) The PHP Group

0 commit comments

Comments
 (0)