From 14e1b5ad46958024f7daff835adcea1d501cdab5 Mon Sep 17 00:00:00 2001
From: ree <>
Date: Sun, 17 Jul 2011 22:11:43 +0000
Subject: [PATCH] When only 1 'extra_ports' is defined in ctrl/modopts.ini then
 the options.extra_ports is an int, and so .replace() fails

---
 exec/flashpolicyserver.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec/flashpolicyserver.js b/exec/flashpolicyserver.js
index 19b3cbdce3..19d885088d 100644
--- a/exec/flashpolicyserver.js
+++ b/exec/flashpolicyserver.js
@@ -67,7 +67,7 @@ if (InString.indexOf(ValidRequest) === -1) {
 function GetToPorts() {
 	var Ports = GetTerminalServerPorts();
 	if (options && (options.extra_ports !== undefined)) {
-		var ExtraPorts = options.extra_ports.replace(/\s/ig, ''); // Flash doesn't seem to like spaces in the to-ports
+		var ExtraPorts = options.extra_ports.toString().replace(/\s/ig, ''); // Flash doesn't seem to like spaces in the to-ports
 		if (ExtraPorts !== "") {
 			Ports += "," + ExtraPorts
 		}
-- 
GitLab