Issue with mail_integration.php
Posted
#5452
(In Topic #1264)

Standard member

On the custom work for IMAP you did i am seeing many problems in the composr error logs for :
8-Jan-2019 17:44:08 UTC PHP Error Uncaught Error: Cannot use object of type stdClass as array in sources/mail_integration.php:425
18-Jan-2019 17:44:08 UTC PHP Fatal error Uncaught Error: Cannot use object of type stdClass as array in /sources/mail_integration.php:425
I believe line 425 relates to :
425: $filename = $structure->parameters[0]->value;
426:
427: $this->log_message('Found attachment, ' . $filename . $qualifier_exp);
428:
429: // Check it's a reasonable file-size
I have tried enabling the /data_custom/mail_integration.log, but nothing is being written.
Any thoughts? There is mail that is not being read on the mail server.
Thanks
Chris
Posted

Site director

I've reviewed the comments in the PHP manual, and come across a possible fix (it's actually 2 in 1).
Code
$filename = $structure->parameters[0]->value;
Code
$filename = isset($structure->dparameters[0]) ? $structure->dparameters[0]->value : 'unknown.dat';
If you're still having problems please drop me an email. I'll need to actually look directly on your servers.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Posted

Standard member

Many thanks,
your fix has resolved the problem and everything has sprung into life!
Chris
1 guest and 0 members have just viewed this.