Title: Plugin Reporting Critical Error
Last modified: January 29, 2021

---

# Plugin Reporting Critical Error

 *  [demzuk](https://wordpress.org/support/users/demzuk/)
 * (@demzuk)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/plugin-reporting-critical-error/)
 * Under some circumstances (I think if it cannot get a connection to the SMTP server)
   it is getting a critical error.
    Having popped debugging on, this seems to be
   sitting in the helper.php area (line 171). There is a function in there called
   stringify, which takes a $may_be_array and a delimiter. When this error occurs,
   the first element of the array is a class (think it was PostMailManWP), which
   is then being sent into implode, though obviously implode doesnt like working
   with classes. In order to reproduce this, I set the outgoing mail server (in 
   the settings) to office365abcd.com, just so it didn’t resolve. This seemed to
   allow me to consistently recreate the error (as the failure rate was quite low).
   The main issue was the users seeing the white screen. It seems like it might 
   need an additional checker around the $may_be_array just to check that not of
   the elements of the array are classes. Perhaps if they are, cast them to an array?
   Thanks so much for any help and advice, Phil.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [demzuk](https://wordpress.org/support/users/demzuk/)
 * (@demzuk)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/plugin-reporting-critical-error/#post-13986929)
 * Would welcome any ideas around this one. It is an intermittent error, though 
   from what I have read in other posts, seems to be exhibiting similar behaviour.
 * Under certain circumstances, I see a Critical Error (like said) though this is
   caused by a call into implode on line 171 in wp-content/plugins/email-log/include/
   util/helper.php
    If the email fails (for whatever reason, though two reasons 
   have been a socket connection failed or a network unreachable error) it sends
   an object into $may_be_array (well, it sends an array, though the first element
   is an object).
 * So a failed call into implode (in stringify) would have a $may_be_array and the
   first value [0] is
    ( [0] => Array ( [0] => PostmanEmailAddress Object ( [name:
   PostmanEmailAddress:private] => [email:PostmanEmailAddress:private] => [bob@wibble.co.uk](https://wordpress.org/support/topic/plugin-reporting-critical-error/bob@wibble.co.uk?output_format=md))))
 * If it succeeds (or all is good) then a successful call into implode is:
 * [01-Feb-2021 15:09:33 UTC] Array
    ( [From] => Array ( [0] => From: “Wibble World”
   <noreply@wibble.co.uk> )
 *  [Content-type] => Array
    ( [0] => Content-type: text/html; charset=UTF-8 ) )
 * So, what causes a Postman object to be sent into Stringify and how could it be
   handled so that it didnt fail on the implode call ?
 * Thanks for advice,
 * Phil.
 *  [Tim](https://wordpress.org/support/users/tneville/)
 * (@tneville)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/plugin-reporting-critical-error/#post-13986974)
 * Hi Phil,
 * Sorry for the delay in responding. Can you confirm:
    - Post SMTP version?
    - Are you running any Post SMTP extensions (Office 365 API, Amazon SES, Better
      Email Logger) etc?
 * If you can also paste your Post SMTP diagnostics log, I will ask [@yehudah](https://wordpress.org/support/users/yehudah/),
   the developer, to take a look when he can.
 * Thank you.
 * Kind Regards,
    Tim
 *  Thread Starter [demzuk](https://wordpress.org/support/users/demzuk/)
 * (@demzuk)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/plugin-reporting-critical-error/#post-13989970)
 * Hi Tim,
 * NP with the delays and thanks for coming back.
 * The version is the latest (updated on Saturday) and no not running any other 
   Post SMTP extensions (I think). Is there somewhere I could send the diagnostic
   logs rather than paste them here ?
 * Apologies for being tricky though thanks for understanding.
 * Phil.
 *  [Tim](https://wordpress.org/support/users/tneville/)
 * (@tneville)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/plugin-reporting-critical-error/#post-13992112)
 * Hi Phil,
 * I understand. Please send them to the developer ([https://postmansmtp.com/contact/](https://postmansmtp.com/contact/))
   and I will ask [@yehudah](https://wordpress.org/support/users/yehudah/) to forward
   it onto me.
 * Please let me know when sent.
 * Kind Regards,
    Tim
 *  Thread Starter [demzuk](https://wordpress.org/support/users/demzuk/)
 * (@demzuk)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/plugin-reporting-critical-error/#post-13992294)
 * Hi Tim,
 * Those have now been sent in.
 * Kind regards
 * Phil.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plugin Reporting Critical Error’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [demzuk](https://wordpress.org/support/users/demzuk/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/plugin-reporting-critical-error/#post-13992294)
 * Status: not resolved