From b063cc8e1cacadc44e6a0482a85086c84c792f00 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Thu, 17 Feb 2011 11:05:09 +0000 Subject: [PATCH] r4236 gwSendFile(): add type check --- wwwroot/inc/gateways.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wwwroot/inc/gateways.php b/wwwroot/inc/gateways.php index 80b2ba79..033144e5 100644 --- a/wwwroot/inc/gateways.php +++ b/wwwroot/inc/gateways.php @@ -229,6 +229,8 @@ function setSwitchVLANs ($object_id = 0, $setcmd) // installer script. function gwSendFile ($endpoint, $handlername, $filetext = array()) { + if (! is_array ($filetext)) + throw new InvalidArgException ('filetext', '(suppressed)', 'is not an array'); global $remote_username; $tmpnames = array(); $endpoint = str_replace (' ', '\ ', $endpoint); // the gateway dispatcher uses read (1) to assign arguments -- 2.25.1