aboutsummaryrefslogtreecommitdiffstats
path: root/includes/libs/filebackend/FileBackend.php
diff options
context:
space:
mode:
authorMax Semenik <maxsem.wiki@gmail.com>2020-04-29 00:34:48 +0300
committerMax Semenik <maxsem.wiki@gmail.com>2020-05-04 18:48:08 +0300
commit2a21e9963374bb11ef2bcad16297e687e59ae45b (patch)
tree301f7f560635967f8648cc770afa9a5683a91623 /includes/libs/filebackend/FileBackend.php
parent96866bf33524dea654c72602e489ca1346219a4c (diff)
downloadmediawikicore-2a21e9963374bb11ef2bcad16297e687e59ae45b.tar.gz
mediawikicore-2a21e9963374bb11ef2bcad16297e687e59ae45b.zip
GlobalFunctions: Fix wfPercent() with negative accuracy
Format strings like "%.-1f" have never been valid, however while previously it would have resulted in output being "1f", in PHP 8 it's an exception. The existing unit test failed because (float)"1f" evaluates to 1, which was rounded down to an expected 0. Adding another test case to make sure it can return anything other than "0%" on PHP 7. While I'm at it, fix wrong phpdoc and add parameter types to this function. Bug: T248925 Change-Id: I018bc17a563c58535f6c84644d707251ab19cd0a
Diffstat (limited to 'includes/libs/filebackend/FileBackend.php')
0 files changed, 0 insertions, 0 deletions