diff --git a/html/ajax_rulesuggest.php b/html/ajax_rulesuggest.php
index cba0a197e..bb49ecab2 100644
--- a/html/ajax_rulesuggest.php
+++ b/html/ajax_rulesuggest.php
@@ -119,7 +119,7 @@ if (isset($_GET['term'],$_GET['device_id'])) {
$obj = array_chunk($obj, 20, true);
$obj = $obj[0];
$flds = array();
- if ($current == true) {
+ if ($current === true) {
foreach ($obj as $fld) {
$flds[] = $fld['name'];
}
diff --git a/html/includes/authentication/ldap.inc.php b/html/includes/authentication/ldap.inc.php
index 02c54931f..f9cc37b21 100644
--- a/html/includes/authentication/ldap.inc.php
+++ b/html/includes/authentication/ldap.inc.php
@@ -4,7 +4,7 @@ $ds = @ldap_connect($config['auth_ldap_server'], $config['auth_ldap_port']);
if ($config['auth_ldap_starttls'] && ($config['auth_ldap_starttls'] == 'optional' || $config['auth_ldap_starttls'] == 'require')) {
$tls = ldap_start_tls($ds);
- if ($config['auth_ldap_starttls'] == 'require' && $tls == false) {
+ if ($config['auth_ldap_starttls'] == 'require' && $tls === false) {
echo '
Fatal error: LDAP TLS required but not successfully negotiated:'.ldap_error($ds).'
';
exit;
}
diff --git a/html/pages/device/apps/shoutcast.inc.php b/html/pages/device/apps/shoutcast.inc.php
index 97591911c..0eea36986 100644
--- a/html/pages/device/apps/shoutcast.inc.php
+++ b/html/pages/device/apps/shoutcast.inc.php
@@ -17,7 +17,7 @@ if ($handle = opendir($rrddir)) {
}
}
-if (isset($total) && $total == true) {
+if (isset($total) && $total === true) {
$graphs = array(
'shoutcast_multi_bits' => 'Traffic Statistics - Total of all Shoutcast servers',
'shoutcast_multi_stats' => 'Shoutcast Statistics - Total of all Shoutcast servers',
diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php
index bab2f3d71..233afbf39 100644
--- a/includes/discovery/functions.inc.php
+++ b/includes/discovery/functions.inc.php
@@ -653,7 +653,9 @@ function discover_mempool(&$valid, $device, $index, $type, $descr, $precision='1
}
else {
echo '.';
- $update_data['mempool_descr'] = $descr;
+ $update_data = array(
+ 'mempool_descr' => $descr,
+ );
if (!empty($entPhysicalIndex)) {
$update_data['entPhysicalIndex'] = $entPhysicalIndex;
diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php
index 4eb12609b..cba317bd8 100644
--- a/includes/polling/functions.inc.php
+++ b/includes/polling/functions.inc.php
@@ -265,10 +265,12 @@ function poll_device($device, $options) {
rrdtool_update($ping_rrd, "N:$ping_time");
}
- $update_array['last_polled'] = array('NOW()');
- $update_array['last_polled_timetaken'] = $device_time;
- $update_array['last_ping'] = array('NOW()');
- $update_array['last_ping_timetaken'] = $ping_time;
+ $update_array = array(
+ 'last_polled' => array('NOW()'),
+ 'last_polled_timetaken' => $device_time,
+ 'last_ping' => array('NOW()'),
+ 'last_ping_timetaken' => $ping_time,
+ );
// echo("$device_end - $device_start; $device_time $device_run");
echo "Polled in $device_time seconds\n";
diff --git a/includes/snmp.inc.php b/includes/snmp.inc.php
index 00eef6d66..ebf143a13 100644
--- a/includes/snmp.inc.php
+++ b/includes/snmp.inc.php
@@ -311,6 +311,7 @@ function snmp_cache_ifIndex($device) {
$data = trim(external_exec($cmd));
$device_id = $device['device_id'];
+ $array = array();
foreach (explode("\n", $data) as $entry) {
list ($this_oid, $this_value) = preg_split('/=/', $entry);
list ($this_oid, $this_index) = explode('.', $this_oid, 2);
diff --git a/scripts/removespikes.php b/scripts/removespikes.php
index c4e7d31f4..9736b24c5 100755
--- a/scripts/removespikes.php
+++ b/scripts/removespikes.php
@@ -733,6 +733,7 @@ function updateXML(&$output, &$rra) {
}
function removeComments(&$output) {
+ $new_array = array();
if (sizeof($output)) {
foreach($output as $line) {
$line = trim($line);