Increase specificity of checks of $param
- Avoids warnings and notices
This commit is contained in:
parent
7799fb99ed
commit
0c203131b9
|
@ -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);
|
||||
|
|
|
@ -23,7 +23,7 @@ class Scrape
|
|||
}
|
||||
|
||||
$params = json_decode($data, true);
|
||||
if (!$params || !count($params)) {
|
||||
if (empty($params) || !is_array($params)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue