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

Errors for undefined variable "groups" in imap.php #88

Closed
alanswanson opened this issue Jun 13, 2019 · 5 comments · Fixed by #90
Closed

Errors for undefined variable "groups" in imap.php #88

alanswanson opened this issue Jun 13, 2019 · 5 comments · Fixed by #90
Labels
0. Needs triage bug Something isn't working
Milestone

Comments

@alanswanson
Copy link

Steps to reproduce

  1. Use user_external with IMAP authentication and no domain in username.

Expected behaviour

No errors.

Actual behaviour

Nextcloud logging the following error on every IMAP password check;

Undefined variable: groups at /var/www/localhost/htdocs/cloud/apps/user_external/lib/imap.php#101

In lib/imap.php for usernames without domains the groups array/variable is not setup at ($this->groupDomain && $pieces[1]) { $groups[] = $pieces[1]; } and hence $this->storeUser($uid, $groups); needs groups previously defined to null or guarded.

Affected Authentication backend

IMAP

Server configuration

User External App version: 0.6.3 plus pull #83

Operating system: Gentoo

Web server: Cherokee

Database: MariaDB

PHP version: 7.1.30

Nextcloud version: 15.0.8

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from: Source

@alanswanson alanswanson added 0. Needs triage bug Something isn't working labels Jun 13, 2019
@violoncelloCH
Copy link
Member

thank you for reporting @alanswanson
as you've already pointed out the lines where this is coming from: would you be willing to create a PR for this?

@violoncelloCH violoncelloCH added this to the 0.6.4 milestone Jun 14, 2019
@realizelol
Copy link

have a look at #56

@violoncelloCH
Copy link
Member

@realizelol that's something different....

@alanswanson
Copy link
Author

The fix in #56 (comment) to apps/user_external/lib/imap.php resolved my log errors. (Though I tidied the the curly bracket formatting and spacing.)

@violoncelloCH
Copy link
Member

violoncelloCH commented Jun 24, 2019

okay I see that was discussed there later as well, but was not part of the original issue description :)
a fix for this is waiting to be merged in #90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants