aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-07-01 22:00:32 -0600
committermcrane <mctch@yahoo.com>2009-07-01 22:01:26 -0600
commit03394fbc64cb204413bc7e5a6655259e1811fb70 (patch)
tree4861054a9b42a7edc44fd7df3c156dd0524de1f0 /config/freeswitch
parente4c9628e9cb2fe69c7c4f661eb5f99739dd66dc1 (diff)
downloadpfsense-packages-03394fbc64cb204413bc7e5a6655259e1811fb70.tar.gz
pfsense-packages-03394fbc64cb204413bc7e5a6655259e1811fb70.tar.bz2
pfsense-packages-03394fbc64cb204413bc7e5a6655259e1811fb70.zip
FreeSWITCH huntgroup check array size before looping through it.
Diffstat (limited to 'config/freeswitch')
-rw-r--r--config/freeswitch/freeswitch.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc
index ad50234f..0a3929eb 100644
--- a/config/freeswitch/freeswitch.inc
+++ b/config/freeswitch/freeswitch.inc
@@ -1339,10 +1339,12 @@ function sync_package_freeswitch_hunt_group()
$tmp .= "\n";
//print_r($tmp_array);
$x = 0;
- foreach ($tmp_array as $row) {
- $tmp .= " session.execute(\"".$row["application"]."\", ".$row["data"].");\n";
+ if (count($tmp_array) > 0) {
+ foreach ($tmp_array as $row) {
+ $tmp .= " session.execute(\"".$row["application"]."\", ".$row["data"].");\n";
+ }
+ unset($tmp_array);
}
- unset($tmp_array);
break;
}