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.
This commit is contained in:
B.Fatih KOZ 2021-09-24 00:07:38 +03:00 committed by GitHub
parent 14e33574fc
commit f99af4cfc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -479,7 +479,7 @@ class PirepService extends Service
$pirep->refresh(); $pirep->refresh();
// Figure out what pirep state should be, if nothing provided yet. // 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; $default_state = PirepState::PENDING;
} else { } else {
$default_state = $pirep->state; $default_state = $pirep->state;