Disallows assignments in some control structures

[MAILPOET-2090]
This commit is contained in:
Pavel Dohnal
2019-05-20 12:27:21 +02:00
committed by M. Shull
parent b9af15e19f
commit d1529a03c3
4 changed files with 8 additions and 3 deletions

View File

@@ -142,7 +142,8 @@ class SendingQueue extends Model {
$subscribers = $this->getSubscribers();
return in_array($subscriber_id, $subscribers['processed']);
} else {
if ($task = $this->task()->findOne()) {
$task = $this->task()->findOne();
if ($task) {
$task_subscribers = new TaskSubscribers($task);
return $task_subscribers->isSubscriberProcessed($subscriber_id);
}