2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-14 21:49:12 +00:00

rename bugfix, when arguments missing "Undefined... message"

git-svn-id: https://svn.fhem.de/fhem/trunk@1996 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-10-20 07:11:56 +00:00
parent 38533b90f3
commit 97554bd3aa

View File

@ -1537,6 +1537,8 @@ CommandRename($$)
my ($cl, $param) = @_;
my ($old, $new) = split(" ", $param);
$old = "''" if(!defined($old));
return "Please define $old first" if(!defined($defs{$old}));
return "Invalid characters in name (not A-Za-z0-9.:_): $new"
if($new !~ m/^[a-z0-9.:_]*$/i);