Increase specificity of checks of $param

- Avoids warnings and notices
This commit is contained in:
Hypolite Petovan 2020-06-20 12:47:17 -04:00
parent 7799fb99ed
commit 0c203131b9
2 changed files with 2 additions and 2 deletions

View file

@ -141,7 +141,7 @@ class Profile
}
// Empty result is due to an offline site.
if (count($params) < 2) {
if (empty($params) || count($params) < 2) {
//But for sites that are already in bad status. Do a cleanup now.
if ($profile_id && $server['health_score'] < $this->settings['remove_profile_health_threshold']) {
$this->profileModel->deleteById($profile_id);

View file

@ -23,7 +23,7 @@ class Scrape
}
$params = json_decode($data, true);
if (!$params || !count($params)) {
if (empty($params) || !is_array($params)) {
return false;
}