I think this was triggered by an attempt to restore a really old and/or broken STACK question that was missing some fields. Previously with PHP 7, blank string fields would have been evaluated to 0 when attempting to perform maths but PHP 8 is more picky so the tidy up after importing such a question now fails. That tidy up is run on all restores so it keeps failing.
Casting to int forces evaluation to 0 and reinstates the old behaviour.
I think this was triggered by an attempt to restore a really old and/or broken STACK question that was missing some fields. Previously with PHP 7, blank string fields would have been evaluated to 0 when attempting to perform maths but PHP 8 is more picky so the tidy up after importing such a question now fails. That tidy up is run on all restores so it keeps failing.
Casting to int forces evaluation to 0 and reinstates the old behaviour.