Closed (fixed)
Project:
File Hash
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2022 at 13:26 UTC
Updated:
12 May 2022 at 23:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rudi teschner commentedComment #3
mfbWhat exception is thrown? We should add a test for this case.
Comment #4
mfbIn my testing with nonexistent file, the hash is NULL, and a PHP warning is logged. This seems like correct behavior to me: If the expected file cannot be found, a warning seems reasonable. Previous versions of File Hash module silently ignored this condition rather than logging a warning, but the warning seems preferable to me.
Do you have a scenario where an exception is thrown rather than a warning?
Comment #5
mfbComment #6
mfbComment #8
mfbI committed the test for current handling, but if we have scenarios where exception is thrown (maybe involving non-core code?) then we should expand the test coverage.
Comment #9
mfbI'm tentatively marking this fixed as I added a test for the intended behavior, but please re-open if you have a scenario where an exception is being thrown instead of a warning being logged.