mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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() {
|
public function hasErrors() {
|
||||||
return sizeof($this->errors);
|
return empty($this->errors) ? 0 : sizeof($this->errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasWarnings() {
|
public function hasWarnings() {
|
||||||
return sizeof($this->warnings);
|
return empty($this->warnings) ? 0 : sizeof($this->warnings);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user