I get the following warnings after submitting a new IMAP server.

Warning: Invalid argument supplied for foreach() in /var/www/core/modules/contrib/pontomail/pontomail.module on line 963

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/www/core/modules/contrib/pontomail/pontomail.module on line 1070

Then there's a slight glitch in the UI since the NO TLS checkbox becomes (on the page after clicking) Enable TLS.

Finally when trying to subscribe to a folder (which is correctly listed, in spite of the warnings above), I get a

Error : Could not subscribe

with the following warnings:

Warning: imap_subscribe(): supplied argument is not a valid imap resource in /var/www/core/modules/contrib/pontomail/IMAPService.inc on line 118

Warning: imap_getmailboxes(): supplied argument is not a valid imap resource in /var/www/core/modules/contrib/pontomail/IMAPService.inc on line 92

Warning: imap_getsubscribed(): supplied argument is not a valid imap resource in /var/www/core/modules/contrib/pontomail/IMAPService.inc on line 109

Warning: Invalid argument supplied for foreach() in /var/www/core/modules/contrib/pontomail/pontomail.module on line 963

Warning: Invalid argument supplied for foreach() in /var/www/core/modules/contrib/pontomail/pontomail.module on line 1023

Warning: Invalid argument supplied for foreach() in /var/www/core/modules/contrib/pontomail/pontomail.module on line 1058

Warning: Invalid argument supplied for foreach() in /var/www/core/includes/form.inc on line 641.

I use Drupal 4.7.2, with php5 and the imap c-client version reported in phpinfo is 2001

CommentFileSizeAuthor
#5 p_0.diff1.31 KBmiglius

Comments

Souvent22’s picture

Are you still getting these errors with the new cvs version?

Danimal’s picture

Hi!

I'm getting the same errors. I just installed the CVS version as of this morning. The errors are:

warning: imap_getmailboxes(): supplied argument is not a valid imap resource in /usr/local/apache2/htdocs/drupal/sites/default/modules/pontomail/IMAPService.inc on line 92.
warning: imap_getsubscribed(): supplied argument is not a valid imap resource in /usr/local/apache2/htdocs/drupal/sites/default/modules/pontomail/IMAPService.inc on line 109.
warning: Invalid argument supplied for foreach() in /usr/local/apache2/htdocs/drupal/sites/default/modules/pontomail/pontomail.module on line 1043.
warning: Invalid argument supplied for foreach() in /usr/local/apache2/htdocs/drupal/sites/default/modules/pontomail/pontomail.module on line 1103.
warning: Invalid argument supplied for foreach() in /usr/local/apache2/htdocs/drupal/sites/default/modules/pontomail/pontomail.module on line 1138.

BTW, it won't let me connect to INBOX, just INBOX.Drafts, INBOX.Sent, and INBOX.Trash. I'm trying to connect to an IMAP server that people normally connect to via SquirrelMail.

-Dan

Danimal’s picture

Note: I'm seeing these errors when I create a new server or click "edit" on an existing server in "My Account->E-Mail Accounts"

-Dan

mangz74’s picture

I also get the same errors. I have tried every possible combinations. Does anyone have a fix for this?

miglius’s picture

Status: Active » Fixed
StatusFileSize
new1.31 KB

Here is the fix.

Souvent22’s picture

Assigned: Unassigned » Souvent22
Status: Fixed » Reviewed & tested by the community

Reopening. Will patch soon with this fix. Thanks guys.

Souvent22’s picture

Status: Reviewed & tested by the community » Fixed

Commited

Anonymous’s picture

Status: Fixed » Closed (fixed)