From 3df3f3327d9f0579479315be06e6ad75eccb246e Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 17 Mar 2011 09:17:49 -0400 Subject: Use is_numeric here instead of just testing the variable (it will fail if the usrid is 0, when that should be valid) --- config/openvpn-client-export/openvpn-client-export.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/openvpn-client-export') diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index c58a6c53..82eae161 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -118,7 +118,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke } // lookup user info - if ($usrid) { + if (is_numeric($usrid)) { $user = $config['system']['user'][$usrid]; if (!$user) { $input_errors[] = "Could not find user settings."; -- cgit v1.2.3