projects
/
koha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a1c343
)
Bug 8015: (follow-up) don't require userenv
author
Galen Charlton
<gmc@esilibrary.com>
Thu, 31 Oct 2013 22:36:39 +0000
(22:36 +0000)
committer
Galen Charlton
<gmc@esilibrary.com>
Thu, 31 Oct 2013 22:51:13 +0000
(22:51 +0000)
Core routines probably should never assume that they're
running with a valid userenv defined.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/MarcModificationTemplates.pm
patch
|
blob
|
history
diff --git
a/C4/MarcModificationTemplates.pm
b/C4/MarcModificationTemplates.pm
index
f504621
..
50b77df
100644
(file)
--- a/
C4/MarcModificationTemplates.pm
+++ b/
C4/MarcModificationTemplates.pm
@@
-495,7
+495,8
@@
sub ModifyRecordWithTemplate {
warn( "Unmodified Record:\n" . $record->as_formatted() ) if DEBUG >= 10;
my $current_date = DateTime->now()->ymd();
- my $branchcode = C4::Context->userenv->{branch};
+ my $branchcode = '';
+ $branchcode = C4::Context->userenv->{branch} if C4::Context->userenv;
my @actions = GetModificationTemplateActions( $template_id );