From f99af4cfc36958fdd394736340aa7a37d8bc35a6 Mon Sep 17 00:00:00 2001 From: "B.Fatih KOZ" Date: Fri, 24 Sep 2021 00:07:38 +0300 Subject: [PATCH] Fix logical operator (#1318) That `if` should return `true` when both conditions are met (pirep not accepted and not rejected yet), so **AND** must be used there ;) Sorry for the trouble. Now it works and listens more carefully. --- app/Services/PirepService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/PirepService.php b/app/Services/PirepService.php index 8f6aed67..66fc927c 100644 --- a/app/Services/PirepService.php +++ b/app/Services/PirepService.php @@ -479,7 +479,7 @@ class PirepService extends Service $pirep->refresh(); // Figure out what pirep state should be, if nothing provided yet. - if ($pirep->state != PirepState::ACCEPTED || $pirep->state != PirepState::REJECTED) { + if ($pirep->state != PirepState::ACCEPTED && $pirep->state != PirepState::REJECTED) { $default_state = PirepState::PENDING; } else { $default_state = $pirep->state;