FIX sizeof doesnt work with null types

This commit is contained in:
Daniel Hensby 2018-07-17 15:53:38 +01:00
parent ef09092450
commit e38c30ff0d
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -1232,11 +1232,11 @@ class InstallRequirements {
}
public function hasErrors() {
return sizeof($this->errors);
return empty($this->errors) ? 0 : sizeof($this->errors);
}
public function hasWarnings() {
return sizeof($this->warnings);
return empty($this->warnings) ? 0 : sizeof($this->warnings);
}
}