From ac1d5e1555e211546ba99fcb8718177f9195f01b Mon Sep 17 00:00:00 2001 From: "B.Fatih KOZ" <74361521+FatihKoz@users.noreply.github.com> Date: Wed, 27 Jan 2021 03:48:43 +0300 Subject: [PATCH] Fix PilotHoursAwards (#1011) !is_int was causing the check always return false even when user enters a proper value like 6000 or 30000 in admin/award settings. We should use !is_numeric instead to see if it is a valid numeric value. --- modules/Awards/Awards/PilotHoursAwards.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Awards/Awards/PilotHoursAwards.php b/modules/Awards/Awards/PilotHoursAwards.php index c7695b37..61ae0d7f 100644 --- a/modules/Awards/Awards/PilotHoursAwards.php +++ b/modules/Awards/Awards/PilotHoursAwards.php @@ -42,7 +42,7 @@ class PilotHoursAwards extends Award */ public function check($flight_minutes = null): bool { - if (!is_int($flight_minutes)) { + if (!is_numeric($flight_minutes)) { Log::error('PilotHourAwards: Flight time "'.$flight_minutes.'" is not a valid flight time'); return false; }