Skip to content

Conversation

@spenserhale
Copy link
Contributor

posix_getpwuid() can return false, and code previously would always treat $user_info as array when it was false, causing errors. Now when posix_getpwuid() returns anything other than array we convert $user_info to array with default name 'unknown'

Fixes #1783.

Describe your approach and how it fixes the issue.

Checklist

  • Project documentation has been updated to reflect the changes in this pull request, if applicable.
  • I have tested the changes in the local development environment (see contributing.md).
  • I have added phpunit tests.

Release Changelog

posix_getpwuid() can return false, and code previously would always treat $user_info as array when it was false, causing errors. Now when posix_getpwuid() returns anything other than array we convert $user_info to array with default name 'unknown'

Release Checklist

  • This pull request is to the master branch.
  • Release version follows semantic versioning. Does it include breaking changes?
  • Update changelog in readme.txt.
  • Bump version in stream.php.
  • Bump Stable tag in readme.txt.
  • Bump version in classes/class-plugin.php.
  • Draft a release on GitHub.

Change [ ] to [x] to mark the items as done.

posix_getpwuid() can return false, and code previously would always treat $user_info as array when it was false, causing errors. Now when posix_getpwuid() returns anything other than array we convert $user_info to array with default name 'unknown'
@spenserhale
Copy link
Contributor Author

Hello @bartoszgadomski

Could you please merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

posix_getpwuid can return false

1 participant