Fixed Bad type-hint on $maxRunTime on some XF Jobs

Xon

Well-known member
Affected version
2.2.8
There are various type hints for $maxRunTime which indicate it is an int, but this is really a float. Thankfully this hasn't been made an argument type hint so it isn't a php 8.1 compat error.
 
I think it's more accurate to say that it is commonly (and by default) an int but it could be a float. Or at least, it's usually initially an int for the first job run.

I guess the options are we type hint it as int|float or we ensure it is always cast to a float and type hint accordingly.

Leaning towards the former to be honest.
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.9).

Change log:
Adjust job-related type hints to int|float.
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom