forked from SSilence/php-imap-client
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
given the following code:
// Above here, the mailbox, user and password have been set up.
$imap = new IMAP($mailbox_CLASS, $user, $password) ;
if ($imap->isConnected()) {
$emails = $imap->getMessages(withbody: false) ; // THIS IS THE SOURCE ERROR LINE
if ( ! in_array('archives', $folders)) {
$imap->addFolder('archives') ;
}
} else {
die("IMAP connection failed\n") ;
}
The connection is esablished but the retrieval of messages (without bodies) fails. Here is the log:
[16-Dec-2025 09:35:57 America/New_York] PHP Warning: Undefined property: stdClass::$dparameters in /www/cgi-bin/imap-client-master/Imap.php on line 799
[16-Dec-2025 09:35:57 America/New_York] PHP Warning: Trying to access array offset on null in /www/cgi-bin/imap-client-master/Imap.php on line 799
[16-Dec-2025 09:35:57 America/New_York] PHP Warning: Attempt to read property "value" on null in /www/cgi-bin/imap-client-master/Imap.php on line 799
[16-Dec-2025 09:35:57 America/New_York] PHP Warning: Attempt to read property "encoding" on false in /www/cgi-bin/imap-client-master/Imap.php on line 801
[16-Dec-2025 09:35:57 America/New_York] PHP Warning: Trying to access array offset on null in /www/cgi-bin/imap-client-master/Imap.php on line 610
[16-Dec-2025 09:35:57 America/New_York] PHP Warning: Trying to access array offset on null in /www/cgi-bin/imap-client-master/Imap.php on line 611
[16-Dec-2025 09:35:57 America/New_York] PHP Warning: Trying to access array offset on null in /www/cgi-bin/imap-client-master/Imap.php on line 612
[16-Dec-2025 09:35:57 America/New_York] PHP Warning: Trying to access array offset on null in /www/cgi-bin/imap-client-master/Imap.php on line 613
[16-Dec-2025 09:35:57 America/New_York] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /www/cgi-bin/imap-client-master/Imap.php:610
Stack trace:
#0 /www/cgi-bin/imap-client-master/Imap.php(263): Imap->attachments2name()
#1 /www/cgi-bin/imap-client-master/Imap.php(181): Imap->formatMessage()
#2 /home/dennis/bin/testimap(44): Imap->getMessages()
#3 {main}
thrown in /www/cgi-bin/imap-client-master/Imap.php on line 610
Metadata
Metadata
Assignees
Labels
No labels