Skip to content

Commit 37d451e

Browse files
authored
Merge pull request #1085 from thephpleague/copilot/fix-1068
Fix benchmark.php CSV path validation for non-existent files
2 parents 7f62b4b + b8ba8fa commit 37d451e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/benchmark/benchmark.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@
120120
"php://fd/{$config['csv']}" :
121121
realpath($config['csv']);
122122

123+
if ($stream === false || $stream === '') {
124+
$usage(
125+
$config,
126+
'path not found: %s',
127+
$config['csv']
128+
);
129+
}
130+
123131
$fd = @fopen(
124132
$stream,
125133
$config['exec'] === 'exec' ?

0 commit comments

Comments
 (0)