Skip to content

Commit 4699f3d

Browse files
authored
bugfix - check null for SERVER_SOFTWARE
1 parent 3c71fb8 commit 4699f3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpXsendfile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ protected function detectServer(): void
154154
$this->server = $this->config['server'];
155155
}
156156
else {
157-
$serverSoftware = $_SERVER['SERVER_SOFTWARE'] ? $_SERVER['SERVER_SOFTWARE'] : null;
157+
$serverSoftware = $_SERVER['SERVER_SOFTWARE'] ?? null;
158158

159159
foreach ($servers as $name => $label) {
160160
if (stripos($serverSoftware, $name) !== false) {

0 commit comments

Comments
 (0)