• 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

    (@demzuk)

    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] => [email protected]
    )
    )
    )

    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” <[email protected]>
    )

    [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.

    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, the developer, to take a look when he can.

    Thank you.

    Kind Regards,
    Tim

    Thread Starter demzuk

    (@demzuk)

    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.

    Hi Phil,

    I understand. Please send them to the developer (https://postmansmtp.com/contact/) and I will ask @yehudah to forward it onto me.

    Please let me know when sent.

    Kind Regards,
    Tim

    Thread Starter demzuk

    (@demzuk)

    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.