Commit graph

12 commits

Author SHA1 Message Date
Alexia E. Smith cf1480cb96 Fix E_WARNING with {{#pos:}} if the offset is larger than the string
The mb_strpos() function throws E_WARNING if the offset is longer
than the length of the string.

Bug: T209600
Change-Id: Ib4296ba136eaf5c8461681e9d5f108118b2494f4
2018-11-15 12:50:32 -08:00
Umherirrender 99659b32c2 Add method scope visibility
Change-Id: I116b91653c01ace9fa0d9a49f2fa43375ef2924d
2018-11-01 19:50:46 +01:00
Jayprakash12345 e6385dfb32 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: I41d7ee671ca103097271379df83cf63d979ee709
2018-04-13 14:58:29 +00:00
Kunal Mehta 23e9751985 build: Updating mediawiki/mediawiki-phan-config to 0.2.0
Change-Id: Ib60f7228deb749ac817fab0f28e2f8c937541cf3
2018-04-05 17:16:51 -07:00
Kunal Mehta 2abee407f2 Add phan configuration
Change-Id: I1127f08213d5ce3f33381506027dc8129cf6aa6c
2018-02-24 14:09:51 -08:00
Kunal Mehta be4f4b1858 Add @covers tag
Change-Id: Ib12892b36b2d1254cfcc861a3a84d859d5834a3f
2018-02-16 20:57:24 -08:00
Kunal Mehta 908f029b80 build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: Iaa65f1987144baffd480d082538547fc9cf2c15b
2017-06-25 13:48:36 +00:00
Umherirrender 04e4c1b300 Add phpcs and make pass
Change-Id: I8f985ca83223f1a2fdb4365294701f3b1d9b019b
2017-06-06 19:51:28 +00:00
Reedy adf6a2edc8 Remove 'UnitTestList' hook
No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: I075b7f6b5e11ead988b0baba5d85745dbb9ac480
2016-08-05 21:24:45 +01:00
Brad Jorsch 0fb7807e9a (bug 43451) Restore old behavior of 'mod', add 'fmod'
In trying to fix bug 35866, I32c9eca6 changed the behavior of 'mod' to
no longer cast its arguments to integers, which conventiently also
solved bug 6068. However, this also broke many existing uses that
depended on that casting.

This change reverts 'mod' to its old behavior while still solving bug
35866, and at the same time adds a new 'fmod' operator with the new
behavior to keep bug 6068 fixed as well.

Change-Id: I6114c6e769119e6ced61b3b55b6f70b03b5b1ebe
2012-12-28 16:27:23 -05:00
Reedy 1a96b47d94 (Bug 35866) ParserFunctions: Division by zero in Expr.php
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
2012-12-11 03:21:58 -08:00
Reedy 57a6ec2942 Bug 42809 - Replace testExpr with a PHPUnit test
Change-Id: I338af01b50684b5849ca198eac536eacdc916ec6
2012-12-07 18:34:58 +01:00