PHP8.3 safety

This commit is contained in:
int2001
2024-05-13 13:35:58 +00:00
parent 6f90b54be8
commit 523d316ed1

View File

@@ -8,21 +8,25 @@ class Genfunctions
function addQslToQuery($postdata) {
$sql = '';
$qsl = array();
if ($postdata['qrz'] != NULL || $postdata['lotw'] != NULL || $postdata['qsl'] != NULL || $postdata['eqsl'] != NULL) {
if ( (($postdata['clublog'] ?? '') != '') ||
(($postdata['qrz'] ?? '') != '') ||
(($postdata['lotw'] ?? '') != '') ||
(($postdata['qsl'] ?? '') != '') ||
(($postdata['eqsl'] ?? '') != '') ) {
$sql .= ' and (';
if ($postdata['qsl'] != NULL) {
if (($postdata['qsl'] ?? '') != '') {
array_push($qsl, "col_qsl_rcvd = 'Y'");
}
if ($postdata['lotw'] != NULL) {
if (($postdata['lotw'] ?? '') != '') {
array_push($qsl, "col_lotw_qsl_rcvd = 'Y'");
}
if ($postdata['eqsl'] != NULL) {
if (($postdata['eqsl'] ?? '') != '') {
array_push($qsl, "col_eqsl_qsl_rcvd = 'Y'");
}
if ($postdata['qrz'] != NULL) {
if (($postdata['qrz'] ?? '') != '') {
array_push($qsl, "COL_QRZCOM_QSO_DOWNLOAD_STATUS = 'Y'");
}
if ($postdata['clublog'] != NULL) {
if (($postdata['clublog'] ?? '') != '') {
array_push($qsl, "COL_CLUBLOG_QSO_DOWNLOAD_STATUS = 'Y'");
}
if (count($qsl) > 0) {
@@ -53,19 +57,19 @@ class Genfunctions
function gen_qsl_from_postdata($postdata) {
$qsl='';
if ($postdata['confirmed'] != NULL) {
if ($postdata['qsl'] != NULL ) {
if (($postdata['qsl'] ?? '')!= '' ) {
$qsl .= "Q";
}
if ($postdata['lotw'] != NULL ) {
if (($postdata['lotw'] ?? '')!= '' ) {
$qsl .= "L";
}
if ($postdata['eqsl'] != NULL ) {
if (($postdata['eqsl'] ?? '')!= '' ) {
$qsl .= "E";
}
if ($postdata['clublog'] != NULL ) {
if (($postdata['clublog'] ?? '')!= '' ) {
$qsl .= "C";
}
if ($postdata['qrz'] != NULL ) {
if (($postdata['qrz'] ?? '')!= '' ) {
$qsl .= "Z";
}
}