[Koha-bugs] [Bug 34532] Silence warns in Patroncard.pm when layout values are empty

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 1 17:19:01 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34532

Victor Grousset/tuxayo <victor at tuxayo.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |victor at tuxayo.net
             Status|Signed Off                  |Failed QA

--- Comment #6 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
Thanks Lucas, more extract variable refactoring :)

Thanks Marcel to also look at this, I started to look at this yesterday and
wondered if there was a reason to have the $llx & $lly default values set in
the method instead of the constructor:
https://git.koha-community.org/Koha-community/Koha/src/commit/e26d7c783eb8c70d318e402e3a90930afcff44cd/C4/Patroncards/Patroncard.pm#L74
Currently there are likely the same warns in the other functions if llx & lly
are undef.

And now I notice it's actually done twice, once in each method, so there is
duplication.
And one occurrence is `my $lly           = $self->{'llx'} || 0;`
which very likely should be $self->{'lly'}

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list