magicbug / Cloudlog

Web based amateur radio logging application built using PHP & MySQL supports general station logging tasks from HF to Microwave with supporting applications to support CAT control.
http://www.cloudlog.co.uk
MIT License
467 stars 192 forks source link

PHP error when trying to update missing grid #2741

Closed ofadam closed 12 months ago

ofadam commented 1 year ago

Describe the bug When trying to update QSOs that are missing the gridsquare, I'm getting a PHP error.

To Reproduce Steps to reproduce the behaviour:

  1. Go to /update/check_missing_grid
  2. A PHP error results for each QSO missing a grid

Error Message

A PHP Error was encountered

Severity: Warning

Message: Undefined array key "gridsquare"

Filename: models/Logbook_model.php

Line Number: 4061

Server info

Cloudlog dev branch
Ubuntu: 22.04.3
PHP: 8.3
Apache: 2.4.54
MySQL: 8.0.35-0ubuntu0.22.04.1
phl0 commented 1 year ago

Fixed with https://github.com/magicbug/Cloudlog/pull/2745.

HB9HIL commented 1 year ago

@ofadam

Please check and close if the issue is gone. Fix is in 'dev' branch 😁

ofadam commented 1 year ago

Hmm.. I'm now getting a long list of "Error: Callsign not found" errors when trying to update grids.

phl0 commented 1 year ago

Hmm.. I'm now getting a long list of "Error: Callsign not found" errors when trying to update grids.

Yepp. Thats the case where the callsign does not have an entry in the callbook you are querying (qrz or hamqth).

ofadam commented 1 year ago

Was that failing silently before recently? I don't remember seeing that error before. No biggie if just a visual change.

phl0 commented 1 year ago

The error has not been handled before. The code assumed that the answer always contained a grid which obviously is not the case. Now we are passing the error from the upstream callbook (e.g. qrz) to the user.

phl0 commented 1 year ago

@ofadam Can you confirm it is fixed? If so please close the issue. Tnx =)

ofadam commented 12 months ago

Confirmed as fixed.