Summary: | Koha::Object::TO_JSON indiscriminately casting to integer | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Isherwood <bugzilla> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, m.de.rooy, martin.renvoize, nick, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18330 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | |||
Bug Blocks: | 20797 | ||
Attachments: |
Bug 20886: Do not cast undef to 0 (TO_JSON)
Bug 20886: (sign-off) Koha::Object::TO_JSON indiscriminately casting to integer Bug 20886: Do not cast undef to 0 (TO_JSON) Bug 20886: Do not cast undef to 0 (TO_JSON) |
Description
Andrew Isherwood
2018-06-06 10:15:00 UTC
CC'ing Tomas in at JD's suggestion (In reply to Andrew Isherwood from comment #1) > CC'ing Tomas in at JD's suggestion You are right. Good catch! Created attachment 75857 [details] [review] Bug 20886: Do not cast undef to 0 (TO_JSON) We should not cast undefined values to 0. Any side-effects to expect with this change? Created attachment 75869 [details] [review] Bug 20886: (sign-off) Koha::Object::TO_JSON indiscriminately casting to integer Works as advertised for me. Created attachment 75875 [details] [review] Bug 20886: Do not cast undef to 0 (TO_JSON) We should not cast undefined values to 0. Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> We need Tomas's stamp on this one Created attachment 75883 [details] [review] Bug 20886: Do not cast undef to 0 (TO_JSON) We should not cast undefined values to 0. Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> This was a bug I introduced. I think the fix is right, and if something gets broken for this, it means it was making the wrong assumptions on the data. Pushed to master for 18.11, awesome work all! This patch has been pushed to 18.05.x and will be in 18.05.01 Pushed to 17.11.x for Is this also for 17.11.x ? It looks similar to Bug 18330 |