diff options
author | Warren Baker <warren@decoy.co.za> | 2011-02-21 11:40:30 +0200 |
---|---|---|
committer | Warren Baker <warren@decoy.co.za> | 2011-02-21 11:40:30 +0200 |
commit | 7c50552db5245717fe2fedff892d4573086478d9 (patch) | |
tree | 6584755554e49897d64c043bdf2e2ae8413c238e /usr/local/www/pkg.php | |
parent | 0e3e825c7836a3c8bfef3e5ff3182c63a5133e51 (diff) | |
download | pfsense-7c50552db5245717fe2fedff892d4573086478d9.zip pfsense-7c50552db5245717fe2fedff892d4573086478d9.tar.gz |
Make sure it is an array before foreach.
Diffstat (limited to 'usr/local/www/pkg.php')
-rwxr-xr-x | usr/local/www/pkg.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/usr/local/www/pkg.php b/usr/local/www/pkg.php index 32c9463..43a0a10 100755 --- a/usr/local/www/pkg.php +++ b/usr/local/www/pkg.php @@ -238,15 +238,17 @@ if ($pkg['tabs'] <> "") { $page = 1; $tmpcount = 0; $tmppp = 0; - foreach ($evaledvar as $ipa) { - if($tmpcount == $display_maximum_rows) { - $page++; - $tmpcount = 0; + if(is_array($evaledvar)) { + foreach ($evaledvar as $ipa) { + if($tmpcount == $display_maximum_rows) { + $page++; + $tmpcount = 0; + } + if($tmppp == $startdisplayingat) + break; + $tmpcount++; + $tmppp++; } - if($tmppp == $startdisplayingat) - break; - $tmpcount++; - $tmppp++; } echo "<tr><td colspan='" . count($pkg['adddeleteeditpagefields']['columnitem']) . "'>"; echo "<table width='100%'>"; |