Browse Source

remove PHP warnings

master
Fabian Kurz 1 year ago
parent
commit
dc183529b6
  1. 7
      functions.php
  2. 4
      index.php
  3. 1
      scores.php

7
functions.php

@ -959,7 +959,12 @@ onblur="javascript:dxcc_lookup(this.value);"
function validate_get ($i) {
$val = $_GET[$i];
if (array_key_exists($i, $_GET)) {
$val = $_GET[$i];
}
else {
$val = "";
}
return validate($i, $val);
}

4
index.php

@ -371,8 +371,8 @@ If you like to start over (re-upload your whole log), you can delete all QSOs th
else {
# first check if there's a valid cookie
$id = $_COOKIE['cwops_id']+0;
$hash = $_COOKIE['cwops_hash'];
$id = array_key_exists('cwops_id', $_COOKIE) ? $_COOKIE['cwops_id']+0 : '';
$hash = array_key_exists('cwops_hash', $_COOKIE) ? $_COOKIE['cwops_hash'] : '';
if (is_int($id) and preg_match("/^[a-f0-9]{40}$/", $hash)) {
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);

1
scores.php

@ -1,5 +1,6 @@
<!DOCTYPE html>
<head>
<title>CWops Award Scores (ACA, CMA, DXCC, WAS, WAE, WAZ)</title>
<link rel="stylesheet" type="text/css" href="/style.css">
</head>
<h2>Score overview</h2>

Loading…
Cancel
Save