Ok, wasn't able to reproduce on PHP 7.4.1 either. I however intentionally broke it by casting to int in the function and confirmed if it receives an int it will fail. This isn't expected since we're retrieving the value as a string, but seams out function for doing this isn't enforcing a string type. Have added a bug ticket to fix.
forge.joomlapolis.com/issues/7883