Skip to content

Commit 64c35d8

Browse files
committed
logo.php: Check if QUERY_STRING is set before using it
Fixes a PHP Notice introduced in 0df71ff.
1 parent 98660d0 commit 64c35d8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

images/logo.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ function serve_compressed_if_available($logo) {
7070
readfile($logo);
7171
}
7272

73-
switch ($_SERVER['QUERY_STRING']) {
74-
case 'QA':
75-
case 'qa':
76-
$logo = './logos/qa.jpg';
77-
break;
78-
default:
79-
$logo = './logos/php-logo.svg';
73+
$logo = './logos/php-logo.svg';
74+
if (isset($_SERVER['QUERY_STRING'])) {
75+
switch ($_SERVER['QUERY_STRING']) {
76+
case 'QA':
77+
case 'qa':
78+
$logo = './logos/qa.jpg';
79+
break;
80+
}
8081
}
8182

8283
// xmas season, december and the first week of January

0 commit comments

Comments
 (0)