98_configdb.pm: add parameter check

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18338 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2019-01-19 15:29:52 +00:00
parent 4daaa523bb
commit d9b1a82741

View File

@ -186,10 +186,11 @@ sub CommandConfigdb($$) {
}
when ('reorg') {
# $param1 = $param1 ? $param1 : 3;
$param1 //= 3;
$param1 = 3 unless $param1;
return "Invalid paramaeter '$param1' for reorg. Must be a number."
unless looks_like_number($param1);
Log3('configdb', 4, "configdb: reorg requested with keep: $param1.");
$ret = _cfgDB_Reorg($a[1]);
$ret = _cfgDB_Reorg($param1);
}
when ('search') {