2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

98_template: handling ReadFile from configDB

git-svn-id: https://svn.fhem.de/fhem/trunk@13688 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2017-03-12 18:16:38 +00:00
parent 838696e65e
commit 61210c8cb4

View File

@ -16,8 +16,7 @@ sub EvaluateTemplate($$) {
# load template from file
my ($err, @result)= FileRead($filename);
return ($err, undef, undef, undef) if(defined($err));
return ($err, undef, undef, undef) if(defined($err) && $err ne "");
# remove trailing newlines and empty/whitespace lines
@result= grep /\S/, map { s/\r?\n$//; $_ } @result;