It seems this method (unintentionally?) accepts a null value, leading to a strange and confusing query:
SELECT rev_timestamp FROM `revision` WHERE rev_id IS NULL LIMIT 1
This was uncovered in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/620918 by patching high-level Skin code.
I think this should either be made impossible with a strict parameter type that disallows non-integer values, or it needs to be explicitly supported with a test and possibly an inline optimisation for the null case so that this logic does not reside in the Skin layer.