]> git.koha-community.org Git - koha.git/commit
Bug 38342: Pass the value to exception to avoid warnings main
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 4 Nov 2024 13:29:16 +0000 (10:29 -0300)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 7 Nov 2024 17:49:40 +0000 (18:49 +0100)
commitdd79a55a344eb7dc93398d90ed7a3ec0f930c970
tree442756e880641f5420a2fb97cd7e97a3d7f091da
parentfee196a0e5cefcf44ac3c5fae06b9c8bace0560c
Bug 38342: Pass the value to exception to avoid warnings

This patch makes the exception on bad enum values in Koha::Object->store
not print a warning in the event of stringifying the exception.

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Booking.t
=> FAIL: You get this warnings:

```
Use of uninitialized value in sprintf at /kohadevbox/koha/Koha/Exceptions/Object.pm line 84.
```
2. Apply this patch
3. Repeat 1
=> SUCCESS: No more uninitialized values warnings
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/Object.pm