Bugzilla – Attachment 11349 Details for
Bug 6448
EAN-13 barcode support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6448 - carp on invalid barcode
Bug-6448---carp-on-invalid-barcode.patch (text/plain), 1.03 KB, created by
Dobrica Pavlinusic
on 2012-08-03 22:04:39 UTC
(
hide
)
Description:
Bug 6448 - carp on invalid barcode
Filename:
MIME Type:
Creator:
Dobrica Pavlinusic
Created:
2012-08-03 22:04:39 UTC
Size:
1.03 KB
patch
obsolete
>From 478e57eab849ce4ec475f4b396f4dd3dca72e1c7 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Sat, 4 Aug 2012 00:03:11 +0200 >Subject: [PATCH] Bug 6448 - carp on invalid barcode > >This is consistent with implementation of other barcode types >which all carp instead of die on invalid barcodes. >--- > C4/Barcodes/EAN13.pm | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > >diff --git a/C4/Barcodes/EAN13.pm b/C4/Barcodes/EAN13.pm >index da27c41..adc1283 100644 >--- a/C4/Barcodes/EAN13.pm >+++ b/C4/Barcodes/EAN13.pm >@@ -24,6 +24,7 @@ use C4::Context; > use C4::Debug; > > use Algorithm::CheckDigits; >+use Carp; > > use vars qw($VERSION @ISA); > use vars qw($debug $cgi_debug); # from C4::Debug, of course >@@ -40,7 +41,8 @@ sub parse { > if ( $ean->is_valid($barcode) ) { > return ( '', $ean->basenumber($barcode), $ean->checkdigit($barcode) ); > } else { >- die "$barcode not valid EAN-13 barcode"; >+ carp "$barcode not valid EAN-13 barcode"; >+ return ( '', $barcode, '' ); > } > } > >-- >1.7.2.5
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 6448
:
8668
|
8669
|
8670
|
9192
|
10019
|
10127
|
10128
|
10129
|
10130
|
10134
|
11041
|
11042
|
11043
| 11349