Skip to content

Commit

Permalink
Merge pull request #2663 from WPO-Foundation/display_errors_3
Browse files Browse the repository at this point in the history
Lighthouse start page notice cleanup
  • Loading branch information
stoyan authored Jan 26, 2023
2 parents ff98065 + fe1407c commit f3551d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions www/lighthouse_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
if (isset($req_url)) {
$url = htmlspecialchars($req_url);
}
$placeholder = 'Enter a website URL...';
$placeholder = 'Enter a website URL...';
$lighthouse = [];
if (file_exists('./settings/server/lighthouse.ini')) {
$lighthouse = parse_ini_file('./settings/server/lighthouse.ini', true);
} elseif (file_exists('./settings/common/lighthouse.ini')) {
$lighthouse = parse_ini_file('./settings/common/lighthouse.ini', true);
} else {
} elseif (file_exists('./settings/lighthouse.ini')) {
$lighthouse = parse_ini_file('./settings/lighthouse.ini', true);
}
?>
Expand Down Expand Up @@ -97,7 +98,7 @@
<label for="location">Test Location:</label>
<select name="location" id="location" onchange="profileChanged()">
<?php
if (isset($lighthouse) && is_array($lighthouse) && isset($lighthouse['locations']) && count($lighthouse['locations'])) {
if (!empty($lighthouse['locations'])) {
foreach ($lighthouse['locations'] as $id => $label) {
$selected = '';
if ($id === $_COOKIE['lhloc']) {
Expand Down

0 comments on commit f3551d0

Please sign in to comment.