Closed i-am-chitti closed 1 month ago
I've a cron job. On it's completion, a stream log is fired via a custom connector. Since, this is a cron job, there is no user provided - https://github.com/xwp/stream/blob/develop/classes/class-connector.php#L158.
Now, I've attached an email alert. When, stream is fired and email is sent, a PHP warning comes up -
PHP Warning: Attempt to read property "user_login" on bool in /var/www/html/wp-content/plugins/stream/alerts/class-alert-type-email.php on line 87
For reference - https://github.com/xwp/stream/blob/develop/alerts/class-alert-type-email.php#L87
No warning. Should have a check if user actually exists.
A warning appears
Drag and drop screenshots in this area that help illustrate the problem.
Bug Report
I've a cron job. On it's completion, a stream log is fired via a custom connector. Since, this is a cron job, there is no user provided - https://github.com/xwp/stream/blob/develop/classes/class-connector.php#L158.
Now, I've attached an email alert. When, stream is fired and email is sent, a PHP warning comes up -
For reference - https://github.com/xwp/stream/blob/develop/alerts/class-alert-type-email.php#L87
Expected Behavior
No warning. Should have a check if user actually exists.
Actual Behavior
A warning appears
Steps to Reproduce the Problem
Screenshots
Drag and drop screenshots in this area that help illustrate the problem.
System Information