Merge pull request #8040 from azt3k/patch-3

Fixes a count() php warning without an api change
This commit is contained in:
Damian Mooyman 2018-04-30 08:57:07 +12:00 committed by GitHub
commit 5a831485bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1347,6 +1347,12 @@ class Member extends DataObject
*/
public static function mapInCMSGroups($groups = null)
{
// non-countable $groups will issue a warning when using count() in PHP 7.2+
if (!$groups) {
$groups = [];
}
// Check CMS module exists
if (!class_exists(LeftAndMain::class)) {
return ArrayList::create()->map();