Bugzilla – Attachment 52180 Details for
Bug 16678
updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpatterns.numberingmethod contains parentheses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpatterns.numberingmethod contains parentheses
Bug-16678-updatedatabasepl-32300006-DB-upgrade-cra.patch (text/plain), 2.18 KB, created by
Kyle M Hall
on 2016-06-08 10:43:32 UTC
(
hide
)
Description:
Bug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpatterns.numberingmethod contains parentheses
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2016-06-08 10:43:32 UTC
Size:
2.18 KB
patch
obsolete
>From fa6c8da1455998dbba5614b310036ed47497aafd Mon Sep 17 00:00:00 2001 >From: Jacek Ablewicz <abl@biblos.pk.edu.pl> >Date: Wed, 8 Jun 2016 10:46:18 +0200 >Subject: [PATCH] Bug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes > if subscription_numberpatterns.numberingmethod contains parentheses > >It seems that if subscription_numberpatterns.numberingmethod contains parentheses, updatedatabase.pl crashes when running the 3.23.00.006 DB upgrade snippet, with the following error: > >[Mon Jun 6 09:06:54 2016] updatedatabase.pl: Unmatched ( in regex; marked by <-- HERE in m/ ( <-- HERE / at /home/koha/kohaclone/installer/data/mysql/updatedatabase.pl line 11498. > >Steps to reproduce: >1/ Have a Koha DB version<3.23.00.006 >2/ Create a subscription numbering with parentheses in it: > ie "Vol. (Month, Year)" with pattern > Vol. {X} ({Y}, {Z}) >3/ Add some serials using that numbering method so that serialseq is filled in DB: > ie "Vol. 16 (February, 2015)" >4/ Run the updatedatabase.pl script either from the cli or just start the webinstaller >5/ The error is produced > >To test: >1/ apply patch >2/ try to reproduce this issue once again, should be fixed now >3/ have a look at the code, make sure the changes are consistent > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > installer/data/mysql/updatedatabase.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 657ba4e..e78fff3 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -11495,7 +11495,10 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > ## We cannot split on multiple values at once, > ## so let's replace each of those values with __SPLIT__ > if (@splits) { >- map( $serialseq =~ s/$_/__SPLIT__/, @splits ); >+ for my $split_item (@splits) { >+ my $quoted_split = quotemeta($split_item); >+ $serialseq =~ s/$quoted_split/__SPLIT__/; >+ } > ( > undef, > $enumeration_data{ $indexes[0] // q{} }, >-- >2.1.4
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 16678
:
52177
|
52180
|
52186