summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-12 21:01:08 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-12 21:01:08 +0545
commit9f6d92a25d6fce8ff3917cff3a736acd2f9312e2 (patch)
tree1f9565dad06df243c7c50923153c6c71b4161522 /src/usr
parent97dbeff6625310015614ed46e593e02b6a5a0d80 (diff)
downloadpfsense-9f6d92a25d6fce8ff3917cff3a736acd2f9312e2.zip
pfsense-9f6d92a25d6fce8ff3917cff3a736acd2f9312e2.tar.gz
status_dhcp6_leases incorrect comparison operator
rather than assignment. Also $dhcpv6leaseinlocaltime was also being re-used as the value part of the foreach - that looks not so good also. Even so, I think the old code would have worked by good luck - in the end $dhcpv6leaseinlocaltime is only compared to "yes" anyway, so if it ended up as unset, or some part of a sub-array of $config['dhcpdv6'] or... it still functioned like "no". I found this by a quick scan through the output of: find /usr -type f -exec grep -H "^[^(]*==" {} \; That returns a lot of other stuff, but the bad uses of "==" stand out.
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/status_dhcpv6_leases.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php
index e8259d4..e665049 100644
--- a/src/usr/local/www/status_dhcpv6_leases.php
+++ b/src/usr/local/www/status_dhcpv6_leases.php
@@ -119,11 +119,11 @@ function leasecmp($a, $b) {
function adjust_gmt($dt) {
global $config;
- $dhcpv6leaseinlocaltime == "no";
+ $dhcpv6leaseinlocaltime = "no";
if (is_array($config['dhcpdv6'])) {
$dhcpdv6 = $config['dhcpdv6'];
- foreach ($dhcpdv6 as $dhcpv6leaseinlocaltime) {
- $dhcpv6leaseinlocaltime = $dhcpv6leaseinlocaltime['dhcpv6leaseinlocaltime'];
+ foreach ($dhcpdv6 as $dhcpdv6params) {
+ $dhcpv6leaseinlocaltime = $dhcpdv6params['dhcpv6leaseinlocaltime'];
if ($dhcpv6leaseinlocaltime == "yes") {
break;
}
OpenPOWER on IntegriCloud