Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix unset of user_id #52

Closed
wants to merge 1 commit into from
Closed

Conversation

vrkansagara
Copy link

issue fixing for the #49 #51

Copy link
Member

@visto9259 visto9259 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comments. The change needs to be made in the mapField() function.

$data = $this->mapField('user_id', 'id', $data);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this change fixes the warning, this is not the right place to make the change. If, for some reason, we needed to use the mapField() function with another key that does not exist in the data, we will get the warning again.
The change should be made in the mapField() function.

if (isset($array[$keyFrom])) {
  $array[$keyTo] = $array[$keyFrom];
  unset($array[$keyFrom];
}

return $array;

@visto9259 visto9259 added the bug Something isn't working label Mar 11, 2024
@visto9259
Copy link
Member

@vrkansagara Will you fix the PR as per my review comments? If not, I will fix it myself.

@visto9259
Copy link
Member

I will fix it myself.

@visto9259 visto9259 closed this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants