• Resolved lukeseager

    (@lukeseager)


    The plugin displays an error on one of my websites when I view the email log screen:

    Warning: Invalid argument supplied for foreach() in /home/sites/15a/6/656a670f33/public_html/wp-content/plugins/wp-mail-catcher/src/GeneralHelper.php on line 195
    
    Warning: Invalid argument supplied for foreach() in /home/sites/15a/6/656a670f33/public_html/wp-content/plugins/wp-mail-catcher/src/GeneralHelper.php on line 206
    
    Warning: Invalid argument supplied for foreach() in /home/sites/15a/6/656a670f33/public_html/wp-content/plugins/wp-mail-catcher/src/GeneralHelper.php on line 195
    
    Warning: Invalid argument supplied for foreach() in /home/sites/15a/6/656a670f33/public_html/wp-content/plugins/wp-mail-catcher/src/GeneralHelper.php on line 206

    I have 850 emails in the log on this website. I have another website on the same server with only a handful of emails, which doesn’t show this warning.

    I guess it could be an issue with scale? I can’t confirm if it’s having an impact on sending emails, as one hasn’t gone out since I noticed the issue and updated the plugin to the latest version.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author JWardee

    (@wardee)

    Hi, thanks for the report. You’re not the only one to report this but I haven’t been able to reproduce it. From what I can gather there are certain emails that trigger this. If you can nail down What sort of emails are you logging, are they WooCommerce, Contact Form 7 etc

    Thread Starter lukeseager

    (@lukeseager)

    Hi, it seems to be that I had 2 items in the list of emails without any data (no to, subject or timestamp). When I deleted one, two of the warnings went away. When I deleted the other, the last 2 warnings went away.

    One of the emails seemed to be triggered by “WP HTML Mail – Email Template Designer” – you can send a test email from their settings page, the blank item in the list was directly before the test email I sent.

    Could it be a case of checking if the log has any data in it, and if not, don’t show it in the list?

    Plugin Author JWardee

    (@wardee)

    Hi @lukeseager, thanks for the additional info I’ve created a bug ticket in our GitHub tracker so I’ll close the issue here. I’ll look into resolving this for the next update

    Thread Starter lukeseager

    (@lukeseager)

    No problem, it doesn’t seem to effect emails going out, so not a major problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Invalid argument supplied for foreach()’ is closed to new replies.