|
Line
Link Here
|
|
parameter given |
|
parameter given |
| 1 |
Bug 11944: Fix encoding issue in C4::ItemType |
1 |
Bug 11944: Fix encoding issue in C4::ItemType |
|
Lines 105-113
sub get {
Link Here
|
| 105 |
my $data = $dbh->selectrow_hashref( |
104 |
my $data = $dbh->selectrow_hashref( |
| 106 |
"SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype |
105 |
"SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype |
| 107 |
); |
106 |
); |
| 108 |
if ( $data->{description} ) { |
|
|
| 109 |
$data->{description} = Encode::encode('UTF-8', $data->{description}); |
| 110 |
} |
| 111 |
my $s; |
107 |
my $s; |
| 112 |
$s->{foo} = "bar" if $s->{foo}; |
108 |
$s->{foo} = "bar" if $s->{foo}; |
| 113 |
use Data::Dumper;warn Dumper $s; |
109 |
use Data::Dumper;warn Dumper $s; |
| 114 |
bless $opts => $class; |
110 |
bless $opts => $class; |
| 115 |
-- Should receive nasty error. |
111 |
-- Should receive nasty error. |
| 116 |
-- Should be told 'No item with barcode: {what you typed}' |
112 |
-- Should be told 'No item with barcode: {what you typed}' |
| 117 |
-- All tests should run successfully. |
113 |
-- All tests should run successfully. |
| 118 |
demonstrates a lack of validation on the itemtype creation |
114 |
demonstrates a lack of validation on the itemtype creation |
| 119 |
screen. Unable to use it without tweaking back end. |
115 |
screen. Unable to use it without tweaking back end. |
| 120 |
That is beyond the scope of this bug. |
116 |
That is beyond the scope of this bug. |
| 121 |
-- |
|
|
| 122 |
C4/ItemType.pm | 3 +++ |
117 |
C4/ItemType.pm | 3 +++ |
| 123 |
t/ItemType.t | 8 +++++--- |
118 |
t/ItemType.t | 8 +++++--- |
| 124 |
2 files changed, 8 insertions(+), 3 deletions(-) |
119 |
2 files changed, 8 insertions(+), 3 deletions(-) |