2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 22:56:34 +00:00

fhem.pl: fix warning if fhem.pl called without argument

git-svn-id: https://svn.fhem.de/fhem/trunk@22074 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-05-30 08:34:11 +00:00
parent e304b45533
commit 961d2a7cc1

View File

@ -480,7 +480,7 @@ my %ra = (
###################################################
# Start the program
my $fhemdebug;
$fhemdebug = shift @ARGV if($ARGV[0] eq "-d");
$fhemdebug = shift @ARGV if($ARGV[0] && $ARGV[0] eq "-d");
prepareFhemTestFile();
if(int(@ARGV) < 1) {
@ -6087,7 +6087,7 @@ applyGlobalAttrFromEnv()
sub
prepareFhemTestFile()
{
return if($ARGV[0] ne "-t" || @ARGV < 2);
return if($ARGV[0] && $ARGV[0] ne "-t" || @ARGV < 2);
shift @ARGV;
if($ARGV[0] !~ m,^(.*?)([^/]+)\.t$, || !-r $ARGV[0]) {