diff --git a/fhem/CHANGED b/fhem/CHANGED index 7359da281..3f8062987 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 50_TelegramBot: rewrite readfile function $_ warning - #msg651947 - bugfix: 49_SSCAM: V2.2.3, fix if SVSversion small is "0" - new: 00_SmartMeterP1: V1.7 New module for reading elec.+gas smartmeters. - feature: 93_DbRep: V5.3.1, new commands optimizeTables (MySQL) and vacuum diff --git a/fhem/FHEM/50_TelegramBot.pm b/fhem/FHEM/50_TelegramBot.pm index c55e0edb1..df455048a 100644 --- a/fhem/FHEM/50_TelegramBot.pm +++ b/fhem/FHEM/50_TelegramBot.pm @@ -116,7 +116,8 @@ # FIX: non-local $_ - see #msg647071 # 2.4.1 2017-06-16 minor fixes - #msg641797 / #msg647071 -# +# FIX: make fileread work for both old and new perl versions +# 2.4.2 2017-07-01 rewrite read file function due to $_ warning - #msg651947 # # ############################################################################## @@ -3240,7 +3241,6 @@ sub TelegramBot_MsgForLog($;$) { # sub TelegramBot_BinaryFileRead($$) { my ($hash, $fileName) = @_; - my $_; return '' if ( ! (-e $fileName) ); @@ -3248,8 +3248,8 @@ sub TelegramBot_BinaryFileRead($$) { open TGB_BINFILE, '<'.$fileName; binmode TGB_BINFILE; - while (){ - $fileData .= $_; + while (my $line = ){ + $fileData .= $line; } close TGB_BINFILE;