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.
This commit is contained in:
parent
0d45fc287b
commit
ac1d5e1555
@ -42,7 +42,7 @@ class PilotHoursAwards extends Award
|
|||||||
*/
|
*/
|
||||||
public function check($flight_minutes = null): bool
|
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');
|
Log::error('PilotHourAwards: Flight time "'.$flight_minutes.'" is not a valid flight time');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user