From 2ac55ccdb70a063376d93c551be7f44d2f5d7f3b Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 23 Dec 2015 16:27:08 +0100 Subject: [PATCH] Fixed error of manage data in synthetic call --- pandora_server/util/pandora_manage.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl index ff88c0714b..eb09e00724 100644 --- a/pandora_server/util/pandora_manage.pl +++ b/pandora_server/util/pandora_manage.pl @@ -3203,6 +3203,14 @@ sub cli_create_synthetic() { print("[ERROR] Type of syntethic module doesn't exists \n\n"); exit 1; } + if (scalar(@{$module_data}) == 0) { + print("[ERROR] No modules data \n\n"); + exit 1; + } + if ($name_module == '') { + print("[ERROR] No module name \n\n"); + exit 1; + } $module->{'custom_integer_1'} = 0; $module->{'custom_integer_2'} = 0; @@ -3219,6 +3227,9 @@ sub cli_create_synthetic() { print("[ERROR] With this type: $synthetic_type only be allow use this operator: 'x' \n\n"); exit 1; } + if (is_numeric(@split_data[1]) == 0) { + continue; + } @data_module = ("",@split_data[0],@split_data[1]); my $text_data = join(',',@data_module); push (@filterdata,$text_data);