summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-07-12 04:10:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-07-12 04:10:42 +0000
commit3f0d26d9f9bbf8c6a30d5392a12e2d8dcec0564d (patch)
tree093a60f1e3e11b9c0f500589e0a71df60a95edc8 /usr/local/captiveportal
parent033ede9717bc6916ab8824ff82984b83a005f338 (diff)
downloadpfsense-3f0d26d9f9bbf8c6a30d5392a12e2d8dcec0564d.zip
pfsense-3f0d26d9f9bbf8c6a30d5392a12e2d8dcec0564d.tar.gz
Do not loop through array if its empty
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-xusr/local/captiveportal/index.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index 321174e..72eaff8 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -63,11 +63,11 @@ if (!$clientmac && !isset($config['captiveportal']['nomacfilter'])) {
/* loop through allowed ip list. if user is on the list then allow
* them access w/o authenticating
*/
-$a_allowedips = &$config['captiveportal']['allowedip'] ;
-foreach ($a_allowedips as $ip) {
- if($clientip == $ip)
- $allowed_ip = true;
-}
+if($config['captiveportal']['allowedip'] <> "")
+ foreach($config['captiveportal']['allowedip'] as $ip) {
+ if($clientip == $ip)
+ $allowed_ip = true;
+ }
if ($clientmac && portal_mac_fixed($clientmac) or $allowed_ip == true) {
/* punch hole in pf table and allow thru ip for the mac addresses */
OpenPOWER on IntegriCloud