mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX sizeof doesnt work with null types
This commit is contained in:
parent
ef09092450
commit
e38c30ff0d
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user