Bugzilla – Attachment 23633 Details for
Bug 10858
Browse selected biblios - OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10858: FIX error if no biblio is selected
Bug-10858-FIX-error-if-no-biblio-is-selected.patch (text/plain), 1.37 KB, created by
Jonathan Druart
on 2013-12-18 14:31:47 UTC
(
hide
)
Description:
Bug 10858: FIX error if no biblio is selected
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-12-18 14:31:47 UTC
Size:
1.37 KB
patch
obsolete
>From 9f17fa59ff4451d6c4d17b5a6abd81905de14351 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 18 Dec 2013 15:20:25 +0100 >Subject: [PATCH] Bug 10858: FIX error if no biblio is selected > >If the user launch a search a directly go to the opac detail page, an >error occurs: > > malformed JSON string, neither array, object, number, string or atom, at > character offset 0 (before "(end of string)") at > /usr/share/perl5/JSON.pm line 171. > >Test plan: >- remove the bibs_selected cookie >- launch a search >- click on a result >- the page should be displayed correctly >(cherry picked from commit 660e8d0437338a5d533d333123b56f0219aec252) > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > opac/opac-detail.pl | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index ab5cbcd..b65e503 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -214,8 +214,7 @@ if ($session->param('busc')) { > my $searchAgain = 0; > my ( $offset, $results_per_page ); > >- my $bibnums = $query->cookie('bibs_selected'); >- $bibnums = JSON::from_json($bibnums); >+ my $bibnums = JSON::from_json( $query->cookie('bibs_selected') || '[]' ); > if ( scalar( @$bibnums ) ) { > $arrParamsBusc{count} = scalar( @$bibnums ); > $arrParamsBusc{listBiblios} = join ',', @$bibnums; >-- >1.7.10.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 10858
:
20947
|
21476
|
21483
|
21646
|
21647
|
21966
|
21967
|
23541
|
23542
|
23543
|
23633
|
23781
|
23782
|
25427
|
25428
|
25429
|
25430
|
25431
|
25432
|
25433
|
25434
|
25435
|
25436
|
25450
|
25451
|
25452
|
25453
|
25454
|
25455
|
25456
|
25457
|
25512
|
25513
|
25514
|
25643
|
25644
|
25645
|
25646
|
25647
|
25648
|
25649
|
25650
|
25651
|
25652
|
25653
|
36757
|
38033
|
38405
|
39502
|
39938
|
41838
|
41839
|
41840
|
41841
|
41842
|
44903
|
56479
|
56480
|
56481
|
56482
|
67073
|
67074
|
67075
|
67076
|
67086
|
67089
|
67090
|
67092
|
67093
|
67974
|
67975
|
67976
|
67977
|
67978
|
71218
|
71219
|
71220
|
71221
|
71222
|
71223
|
91584
|
91585
|
91586
|
91587
|
91588
|
91589
|
94833