Merge pull request #8268 from dhensby/pulls/3.7.1/fix-installer-error

FIX sizeof doesnt work with null types
This commit is contained in:
Daniel Hensby 2018-07-17 16:24:02 +01:00 committed by GitHub
commit 259a0a50ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
}