diff --git a/functions/classes/class.PDO.php b/functions/classes/class.PDO.php index aeb940c..1f076a2 100644 --- a/functions/classes/class.PDO.php +++ b/functions/classes/class.PDO.php @@ -1042,6 +1042,13 @@ private function set_db_params () { $this->ssl[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = false; } + $db += [ + 'ssl_key' => null, + 'ssl_cert' => null, + 'ssl_ca' => null, + 'ssl_cipher' => null, + 'ssl_capath' => null + ]; foreach ($this->pdo_ssl_opts as $key => $pdoopt) { if ($db[$key]) { $this->ssl[$pdoopt] = $db[$key]; diff --git a/functions/classes/class.Scan.php b/functions/classes/class.Scan.php index e79a1b0..5cfba6d 100644 --- a/functions/classes/class.Scan.php +++ b/functions/classes/class.Scan.php @@ -446,6 +446,7 @@ public function ping_address_method_fping_subnet ($subnet_cidr, $return_result = exec($cmd, $output, $retval); # save result + $out = null; if(sizeof($output)>0) { foreach($output as $line) { if (!preg_match('/timed out/', $line)) { @@ -921,4 +922,4 @@ function fping_subnet ($subnet_cidr, $return = true) { global $Scan; //scan return $Scan->ping_address_method_fping_subnet ($subnet_cidr, $return); -} \ No newline at end of file +} diff --git a/functions/classes/class.phpipamAgent.php b/functions/classes/class.phpipamAgent.php index aaf1f8d..8ed95c0 100644 --- a/functions/classes/class.phpipamAgent.php +++ b/functions/classes/class.phpipamAgent.php @@ -1025,7 +1025,7 @@ private function mysql_scan_discovered_write_to_db ($subnets) { } // loop foreach($subnets as $s) { - if(is_array($s->discovered)) { + if (isset($s->discovered) && is_array($s->discovered)) { foreach($s->discovered as $ip) { // try to resolve hostname $tmp = new stdClass();