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

Improve handling of current user information for Filechecks #16941

Merged

Conversation

aragon999
Copy link
Contributor

Description:

I had a PHP Notice:

PHP Notice:  Trying to access array offset on value of type bool in Filechecks.php:205

while the actual problem was, that I was inside a docker container and had the wrong group-id assigned.

I only had a notice, since the user permissions still worked, but I think that place needs better handling. This PR is a first try to improve the situation.

Review

  • Functional review done
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@tsteur tsteur added the Needs Review PRs that need a code review label Dec 13, 2020
@tsteur tsteur added this to the 4.1.0 milestone Dec 13, 2020
Copy link
Member

@diosmosis diosmosis left a comment

Choose a reason for hiding this comment

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

Thanks for the first contribution @aragon999 ! I requested some changes, but in general I think this change is fine to include given the new logic is only meant to be used if we cannot find a user/group through existing methods. 👍

core/Filechecks.php Outdated Show resolved Hide resolved
core/Filechecks.php Outdated Show resolved Hide resolved
@aragon999 aragon999 force-pushed the refactor/current-user-id-recognition branch from 58e4e42 to 873923b Compare December 14, 2020 09:49
@diosmosis diosmosis merged commit cb493af into matomo-org:4.x-dev Dec 15, 2020
@diosmosis
Copy link
Member

I merged this, @aragon999, thanks again for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants