Fix QR code generation
Summary:
This was already attempted to get fixed in rP816865e153b4 / D26180.
The problem is not that the return value contains a float, but that $col can
be a float due to the division by $this->blocks. Cast to int does the trick
here (rounding would actually be bad in this case).
See also https://we.phorge.it/rP816865e15#5844
Test Plan:
(copied from D26180)
- Go a bunch of times to http://phorge.localhost/settings/panel/multifactor/
and click through until a QR Code is being displayed.
(I guess. As the issue does not always happen.)
- Scan QR Code and confirm setup by entering TOTP Code; seems to still work.
Reviewers: avivey, O1 Blessed Committers, aklapper
Reviewed By: O1 Blessed Committers, aklapper
Subscribers: pppery, aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26561