This PR fixes the issue where wp_mail triggers a fatal error if a non-array value is passed in wp_mail filter. In general, passing a null or non array value to wp_mail shouldn't be encouraged but such case should not trigger a fatal error just like how it works if WP Mail Logging plugin is not activated.
Description
This PR fixes the issue where
wp_mail
triggers a fatal error if a non-array value is passed inwp_mail
filter. In general, passing anull
or nonarray
value towp_mail
shouldn't be encouraged but such case should not trigger a fatal error just like how it works if WP Mail Logging plugin is not activated.Motivation
Fixes #94.
Testing and procedure.
functions.php
or anywhere that it'll run.