Bugzilla – Attachment 77499 Details for
Bug 20855
transferstoreceive.pl returns internal server error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Don't invoke _description_ on an undef itemtype
itemtype_description.diff (text/plain), 2.58 KB, created by
Paul Hoffman
on 2018-08-06 20:49:49 UTC
(
hide
)
Description:
Don't invoke _description_ on an undef itemtype
Filename:
MIME Type:
Creator:
Paul Hoffman
Created:
2018-08-06 20:49:49 UTC
Size:
2.58 KB
patch
obsolete
>diff -ur buggy/getitem-ajax.pl fixed/getitem-ajax.pl >--- buggy/getitem-ajax.pl 2018-04-18 11:50:12.000000000 -0400 >+++ fixed/getitem-ajax.pl 2018-08-06 16:39:49.837819656 -0400 >@@ -73,7 +73,7 @@ > $item->{materials} = $descriptions->{lib} // ''; > > my $itemtype = Koha::ItemTypes->find( $item->{itype} ); >- $item->{itemtype} = $itemtype->description; # FIXME Should not it be translated_description? >+ $item->{itemtype} = $itemtype->description if $itemtype; # FIXME Should not it be translated_description? > } > > my $json_text = to_json( $item, { utf8 => 1 } ); >diff -ur buggy/summary-print.pl fixed/summary-print.pl >--- buggy/summary-print.pl 2018-04-18 11:50:12.000000000 -0400 >+++ fixed/summary-print.pl 2018-08-06 16:39:49.837819656 -0400 >@@ -104,7 +104,7 @@ > GetIssuingCharges( $issue->{itemnumber}, $borrowernumber ); > > $itemtype = Koha::ItemTypes->find( $itemtype ); >- $row{'itemtype_description'} = $itemtype->description; #FIXME Should not it be translated_description >+ $row{'itemtype_description'} = $itemtype->description if $itemtype; #FIXME Should not it be translated_description > > $row{'charge'} = sprintf( "%.2f", $charge ); > >diff -ur buggy/transferstoreceive.pl fixed/transferstoreceive.pl >--- buggy/transferstoreceive.pl 2018-04-18 11:50:12.000000000 -0400 >+++ fixed/transferstoreceive.pl 2018-08-06 16:39:49.841819624 -0400 >@@ -96,7 +96,7 @@ > my $itemtype = Koha::ItemTypes->find( $item->effective_itemtype ); > > $getransf{'datetransfer'} = $num->{'datesent'}; >- $getransf{'itemtype'} = $itemtype->description; # FIXME Should not it be translated_description? >+ $getransf{'itemtype'} = $itemtype->description if $itemtype; # FIXME Should not it be translated_description? > %getransf = ( > %getransf, > title => $biblio->title, >diff -ur buggy/waitingreserves.pl fixed/waitingreserves.pl >--- buggy/waitingreserves.pl 2018-04-18 11:50:12.000000000 -0400 >+++ fixed/waitingreserves.pl 2018-08-06 16:39:49.845819648 -0400 >@@ -111,7 +111,7 @@ > my ( $expire_year, $expire_month, $expire_day ) = split (/-/, $num->{'expirationdate'}); > my $calcDate = Date_to_Days( $expire_year, $expire_month, $expire_day ); > >- $getreserv{'itemtype'} = $itemtype->description; # FIXME Should not it be translated_description? >+ $getreserv{'itemtype'} = $itemtype->description if $itemtype; # FIXME Should not it be translated_description? > $getreserv{'title'} = $biblio->title; > $getreserv{'subtitle'} = GetRecordValue( > 'subtitle',
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20855
: 77499