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
461 stars 190 forks source link

PHP error when trying to update missing grid #2741

Closed ofadam closed 11 months ago

ofadam commented 11 months 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 11 months ago

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

HB9HIL commented 11 months ago

@ofadam

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

ofadam commented 11 months ago

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

phl0 commented 11 months 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 11 months ago

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

phl0 commented 11 months 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 11 months ago

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

ofadam commented 11 months ago

Confirmed as fixed.