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

Parse all quotas from GETQUOTAROOT #6280

Merged
merged 1 commit into from
May 5, 2018
Merged

Parse all quotas from GETQUOTAROOT #6280

merged 1 commit into from
May 5, 2018

Conversation

ledgr
Copy link
Contributor

@ledgr ledgr commented May 4, 2018

RoundCube was parsing only the first quota triplet for every Quota Root.
This PR fixes it and in result displays all the enabled quotas.

screen shot 2018-05-04 at 15 29 29

@alecpl alecpl added this to the 1.3.7 milestone May 5, 2018
@alecpl alecpl merged commit c236c22 into roundcube:master May 5, 2018
alecpl pushed a commit that referenced this pull request May 5, 2018
while ($line) {
list($type, $used, $total) = $this->tokenizeResponse($line, 1);
$quotas = $this->tokenizeResponse($line, 1);
foreach (array_chunk($quotas, 3) as $quota) {
Copy link

@aspettl aspettl Aug 5, 2018

Choose a reason for hiding this comment

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

I get the following PHP warning with the current release (1.3.7) in this line:

[04-Aug-2018 15:38:30 UTC] PHP Warning:  array_chunk() expects parameter 1 to be array, null given in /var/www/html/program/lib/Roundcube/rcube_imap_generic.php on line 3129
[04-Aug-2018 15:38:30 UTC] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/program/lib/Roundcube/rcube_imap_generic.php on line 3129

My IMAP server (Courier 4.17.2) is not configured for quotas, probably that is the reason. I don't know anything about the IMAP protocol itself, but probably we should do nothing in case of $quotas === NULL?

Edit: sorry, I see we already have the issue #6374 (did not re-check the issue list until just now)

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

Successfully merging this pull request may close these issues.

3 participants