Bugzilla – Attachment 8797 Details for
Bug 7871
Crash on suggestion pages when a budget in use has been deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch #1
0001-Bug-7871-prevents-crash-when-suggestion-linked-to-er.patch (text/plain), 1.22 KB, created by
Adrien SAURAT
on 2012-04-03 07:58:44 UTC
(
hide
)
Description:
proposed patch #1
Filename:
MIME Type:
Creator:
Adrien SAURAT
Created:
2012-04-03 07:58:44 UTC
Size:
1.22 KB
patch
obsolete
>From f5d989fd2c7d9c289dbb40fa09ba52ec7393a211 Mon Sep 17 00:00:00 2001 >From: Adrien Saurat <adrien.saurat@biblibre.com> >Date: Tue, 3 Apr 2012 09:56:46 +0200 >Subject: [PATCH] Bug 7871: prevents crash when suggestion linked to erased budget > >--- > suggestion/suggestion.pl | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 7f197d8..f7c50b5 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -205,7 +205,10 @@ if ($op=~/else/) { > > my $suggestions = &SearchSuggestion($suggestion_ref); > foreach my $suggestion (@$suggestions) { >- $suggestion->{budget_name} = GetBudget( $suggestion->{budgetid} )->{budget_name} if $suggestion->{budgetid}; >+ if ($suggestion->{budgetid}){ >+ my $bud = GetBudget( $suggestion->{budgetid} ); >+ $suggestion->{budget_name} = $bud->{budget_name} if $bud; >+ } > foreach my $date qw(suggesteddate manageddate accepteddate) { > if ($suggestion->{$date} and $suggestion->{$date} ne "0000-00-00" && $suggestion->{$date} ne "" ) { > $suggestion->{$date} = format_date( $suggestion->{$date} ); >-- >1.7.4.1 >
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 7871
:
8797
|
9033