mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ParserFunctions
synced 2024-11-15 11:59:54 +00:00
1a96b47d94
The PHP modulo operator ('%') casts its operands to ints, causing floating point values 0 < $right < 1 to raise a divide-by-zero error. Explicitly casting both operands to float and using fnmod() resolves the issue. This change also tidies up the check for zero values and adds tests. Change-Id: I32c9eca6552e4fec248eb4fa6419faa39c10df3b |
||
---|---|---|
.. | ||
ExpressionTest.php |