DbUserGroupBackend: Use is_numeric() instead of is_int()
Using MySQL fetchColumn() returns integers for id fields, using MariaDB though, fetchColumn() returns strings.. fixes #9572
This commit is contained in:
parent
604ef87de8
commit
f5089dab1a
|
@ -229,12 +229,12 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa
|
|||
*/
|
||||
protected function persistGroupId($groupName)
|
||||
{
|
||||
if (! $groupName || empty($groupName) || is_int($groupName)) {
|
||||
if (! $groupName || empty($groupName) || is_numeric($groupName)) {
|
||||
return $groupName;
|
||||
}
|
||||
|
||||
if (is_array($groupName)) {
|
||||
if (is_int($groupName[0])) {
|
||||
if (is_numeric($groupName[0])) {
|
||||
return $groupName; // In case the array contains mixed types...
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue