Skip to content

Commit

Permalink
Add debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
umutphp committed Jun 13, 2021
1 parent 79acea4 commit 56d248a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@ private function checkWordPress(Settings $settings, Output $output)
);
$output->writeNewLine();

$failed = false;

try {
$vulResult = $this->checkWordPressVersion($wp_version, $settings);

// Get Vulnerabilities and check the WordPress with version
if (count($vulResult[$wp_version]['vulnerabilities'])) {
$failed = true;

$output->error(); // For vulnerability
} else {
$output->ok(); // For success
Expand All @@ -135,17 +139,13 @@ private function checkWordPress(Settings $settings, Output $output)
}
}

var_dump($vulResult);

if (count($vulResult[$wp_version]['vulnerabilities'])) {
if ($failed) {
if ($this->settings->output != 'NO') {
$this->output($vulResult, $output);
}

return false;
}

return true;
return !$failed;
}

/**
Expand Down

0 comments on commit 56d248a

Please sign in to comment.