This becomes visible since Bug 33745: Lazily create attribute accessor methods in AUTOLOAD. Note that Koha::ItemType was introduced with an unneeded SUPER reference on commit db2a1aa0dda1c786c34c3cf239fccfcaedefd094: +sub image_location { + my ( $self, $interface ) = @_; + return C4::Koha::getitemtypeimagelocation( $interface, $self->SUPER::imageurl ); +} We should just use $self->imageurl.
Created attachment 153838 [details] [review] Bug 34357: Replace SUPER->imageurl in ItemTypes Test plan: Run t/db_dependent/Koha/ItemTypes.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Marcel de Rooy from comment #0) > Note that Koha::ItemType was introduced with an unneeded SUPER reference on > commit db2a1aa0dda1c786c34c3cf239fccfcaedefd094: > +sub image_location { > + my ( $self, $interface ) = @_; > + return C4::Koha::getitemtypeimagelocation( $interface, > $self->SUPER::imageurl ); > +} Any idea why this was introduced like that, Jonathan?
Created attachment 153844 [details] [review] Bug 34357: Replace SUPER->imageurl in ItemTypes Test plan: Run t/db_dependent/Koha/ItemTypes.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Marcel de Rooy from comment #2) > (In reply to Marcel de Rooy from comment #0) > > Note that Koha::ItemType was introduced with an unneeded SUPER reference on > > commit db2a1aa0dda1c786c34c3cf239fccfcaedefd094: > > +sub image_location { > > + my ( $self, $interface ) = @_; > > + return C4::Koha::getitemtypeimagelocation( $interface, > > $self->SUPER::imageurl ); > > +} > > Any idea why this was introduced like that, Jonathan? No idea, that does not seem to make sense here.
Created attachment 154060 [details] [review] Bug 34357: Replace SUPER->imageurl in ItemTypes Test plan: Run t/db_dependent/Koha/ItemTypes.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 23.11. Nice work everyone, thanks!
Depends on Bug 33745 not in 23.05.x