From cab7db9ab3622941c8336ce96ece2deb04ccab97 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sun, 12 May 2019 19:22:54 -0500 Subject: [PATCH] Bug 22893: Do not crash if contributors.yaml does not exist --- about.pl | 5 ++++- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 16 +++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/about.pl b/about.pl index 62d15edf16..0a7300ce4d 100755 --- a/about.pl +++ b/about.pl @@ -531,7 +531,10 @@ if ( defined C4::Context->config('docdir') ) { } ## Contributors -my $contributors = LoadFile("$docdir"."/contributors.yaml"); +my $contributors = + -e "$docdir" . "/contributors.yaml" + ? LoadFile( "$docdir" . "/contributors.yaml" ) + : {}; my @people = map { { name => $_, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index b908428e7b..39216984bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -469,11 +469,17 @@

Koha development team

- + [% IF contributors.size %] + + [% ELSE %] +
+ Could not read the contributors.yaml file. Please make sure <docdir> is correctly defined in koha-conf.xml. +
+ [% END %]

Contributing companies and institutions

-- 2.11.0