php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Recursive handling of stdClass in response

Open wurst-hans opened this issue 7 months ago • 0 comments

For example, calling overview() on a folder using LegacyProcotol (i.e. POP3) can result in error Error: Object of class stdClass could not be converted to string in /path/to/code/webklex/php-imap/src/Connection/Protocols/Response.php:365, because response might contain stdClass object which is not yet handled recursively by verify_data().

Because stdClass is handled in a similar way like arrays in PHP, we can simply add check for $data instanceof stdClass to IF-clause in verify_data() and recursive processing is done by existing code then.

wurst-hans avatar May 07 '25 18:05 wurst-hans