Skip to content

Commit

Permalink
validated data for attributes decode function
Browse files Browse the repository at this point in the history
  • Loading branch information
Yansell Rivas committed Oct 13, 2021
1 parent 937eb47 commit c2d1a47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Service/KeycloakAdminUserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function updateUserGroup($id, $groupId, $data) {

private function attributesDecode($data = null)
{
if(array_key_exists("attributes",$data) && $data["attributes"]){
if($data && is_array($data) && array_key_exists("attributes",$data) && $data["attributes"]){
foreach ($data['attributes'] as $attribute => $value) {
if(strpos($attribute,self::DENIED_ROLES) !== false && is_array($value)){
$data['attributes'][$attribute] = $this->isJSON($value[0]) ? json_decode($value[0],true) : [];
Expand Down

0 comments on commit c2d1a47

Please sign in to comment.