-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Array to string conversion on $folder_->messages()->all()->setFetchOrderDesc()->get(); #520
Comments
Hi @Pascal76 , Best regards & happy coding, |
waiting for the post 6.0 build, because you added some new changes. |
This exception is thrown when the flags, headers, sizes or content method on the ImapProtocol.php is called with the $uids as an empty array. Because the fetch method checks if the $from is an array and filled with at least one item, the check fails and causes an Array to String conversion. Still happens on version 6.1.0 |
Hi @Ruud-Gerrits , Best regards & happy coding, |
Hi @Webklex.
For example, when working with pagination.
When there are 0 or 1 letters on the second page. There are 3 or 4 emails in total. If 0 (empty) on second page, then the error is: php: 8.4.2/8.4.3 |
When doing :
$messages = $folder_->messages()->all()->setFetchOrderDesc()->get();
I sometimes get this error :
[26-Sep-2024 10:40:13 Europe/Paris] PHP Warning: Array to string conversion in /apache_sites/jbm/lib_8.2/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php on line 707
[26-Sep-2024 10:40:13 Europe/Paris] PHP Stack trace:
[26-Sep-2024 10:40:13 Europe/Paris] PHP 1. {main}() /apache_sites/jbm/new_msg_retrieve_new_msg_php-imap.php:0
[26-Sep-2024 10:40:13 Europe/Paris] PHP 2. Webklex\PHPIMAP\Query\Query->get() /apache_sites/jbm/new_msg_retrieve_new_msg_php-imap.php:491
[26-Sep-2024 10:40:13 Europe/Paris] PHP 3. Webklex\PHPIMAP\Query\Query->curate_messages($available_messages = class Illuminate\Support\Collection { protected $items = [0 => [...]]; protected $escapeWhenCastingToString = FALSE }) /apache_sites/jbm/lib_8.2/vendor/webklex/php-imap/src/Query/Query.php:380
[26-Sep-2024 10:40:13 Europe/Paris] PHP 4. Webklex\PHPIMAP\Query\Query->populate($available_messages = class Illuminate\Support\Collection { protected $items = [0 => [...]]; protected $escapeWhenCastingToString = FALSE }) /apache_sites/jbm/lib_8.2/vendor/webklex/php-imap/src/Query/Query.php:316
[26-Sep-2024 10:40:13 Europe/Paris] PHP 5. Webklex\PHPIMAP\Query\Query->fetch($available_messages = class Illuminate\Support\Collection { protected $items = [0 => [...]]; protected $escapeWhenCastingToString = FALSE }) /apache_sites/jbm/lib_8.2/vendor/webklex/php-imap/src/Query/Query.php:347
[26-Sep-2024 10:40:13 Europe/Paris] PHP 6. Webklex\PHPIMAP\Connection\Protocols\ImapProtocol->flags($uids = [0 => [0 => 'OK', 1 => 'SEARCH', 2 => 'completed', 3 => [...]]], $uid = 1) /apache_sites/jbm/lib_8.2/vendor/webklex/php-imap/src/Query/Query.php:241
[26-Sep-2024 10:40:13 Europe/Paris] PHP 7. Webklex\PHPIMAP\Connection\Protocols\ImapProtocol->fetch($items = [0 => 'FLAGS'], $from = [0 => [0 => 'OK', 1 => 'SEARCH', 2 => 'completed', 3 => [...]]], $to = NULL, $uid = 1) /apache_sites/jbm/lib_8.2/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php:841
[26-Sep-2024 10:40:13 Europe/Paris] PHP 8. implode($separator = ',', $array = [0 => [0 => 'OK', 1 => 'SEARCH', 2 => 'completed', 3 => [...]]]) /apache_sites/jbm/lib_8.2/vendor/webklex/php-imap/src/Connection/Protocols/ImapProtocol.php:707
The text was updated successfully, but these errors were encountered: