Bug 36878 - Spurious warnings in C4::ILSDI::AuthenticatePatron
Summary: Spurious warnings in C4::ILSDI::AuthenticatePatron
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low trivial
Assignee: Andreas Jonsson
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-16 07:21 UTC by Andreas Jonsson
Modified: 2024-08-24 19:30 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 36878: Silence spurious warning in C4::ILSDI (1.24 KB, patch)
2024-05-16 07:25 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 36878: Silence spurious warning in C4::ILSDI (1.29 KB, patch)
2024-06-07 08:03 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jonsson 2024-05-16 07:21:58 UTC
Spurious warning about undefined variable in logfiles.
Comment 1 Andreas Jonsson 2024-05-16 07:25:42 UTC
Created attachment 166803 [details] [review]
Bug 36878: Silence spurious warning in C4::ILSDI

Test plan:

Review patch and verify that:

* the only effect is that no warning will be emitted
  in the event the variable $status is undefined, and
* the variable $status being undefined is normal and
  harmless.
Comment 2 Chris Cormack 2024-06-07 08:03:03 UTC
Created attachment 167561 [details] [review]
Bug 36878: Silence spurious warning in C4::ILSDI

Test plan:

Review patch and verify that:

* the only effect is that no warning will be emitted
  in the event the variable $status is undefined, and
* the variable $status being undefined is normal and
  harmless.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 3 Nick Clemens (kidclamp) 2024-06-24 23:12:27 UTC
In what case is status expected to be undefined? It is the first return variable from checkpw which should be 1,0,-1 according to the code
Comment 4 Andreas Jonsson 2024-08-24 19:30:17 UTC
The warnings in the logfile makes it apparent that $status occasionally is undefined.

checkpw is a messy subroutine, but two apparent cases where $status is undefined is $patron->account_locked and $stored_hash eq '!'.