Commit graph

11 commits

Author SHA1 Message Date
Thiemo Mättig
91a920fd85 Remove auto-generated "Constructor" documentation on constructors
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.

This is similar to I994d11e. Even more trivial, because this here is
about comments that don't say anything but "constructor".

Change-Id: I474dcdb5997bea3aafd11c0760ee072dfaff124c
2017-07-21 12:19:30 +02:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Timo Tijhof
fc206806d8 HttpError: Convert line breaks in text message to <br>
Used by MediaWiki::tryNormaliseRedirect() for example with plain text
containing line breaks.

Change-Id: I5949046af4065c5536080212b96374466849b91a
2015-09-16 18:28:41 +00:00
Timo Tijhof
70429dc8a2 Use HttpStatus::header instead of manually crafting header()
Also:
* Update wfHttpError() to use uppercase DOCTYPE, to match other code
  such as Html.php, wfThumbError(), HttpError.php, etc.

Change-Id: I4027e7fe1a138b03f78797b6d1bfe7bd1064d360
2015-06-04 02:27:35 +00:00
aude
acfff1bff1 Add tests for HttpError
Still missing tests for HttpError::report, but would
have caught the issue that Ie216d19 fixed.

Change-Id: Ic35d70af52c3a2d2a25fc3b9952383198db31fb1
2015-06-01 20:42:21 +02:00
Marius Hoch
e826f36d12 Fix undefined variable $header in HttpError
Change-Id: Ie216d1959f2ea903fdbc124b718b4988e08229ae
Follows-up: I8b61d7e9ea4101e3a9ef5f9a59a97db45aeef68c
2015-06-01 19:40:41 +02:00
Timo Tijhof
0e84138017 HttpError: Consistently escape document title
Wasn't actually a vulnerability because HttpStatus::getMessage
can only return one of a fixed set of values which are all plain
text without any special characters. However the return value
there is meant to plain text and not html, so just like
Html::element and other interfaces, things should be consitently
escaped.

Also renamed variables for clarity.

Change-Id: I8b61d7e9ea4101e3a9ef5f9a59a97db45aeef68c
2015-06-01 14:58:19 +01:00
Bryan Davis
1195e11a8a Move MWLogger classes to MediaWiki\Logger namespace
Move the MWLogger PSR-3 logging related classes into the
MediaWiki\Logger namespace. Create shim classes to ease migration of
existing MWLoggerFactory usage to the namespaced classes.

Bug: T93406
Change-Id: I359cc81fbd2dcf8937742311dcc7d3dee08747b0
2015-04-03 11:32:24 -07:00
Marius Hoch
ff707bba77 Don't log HttpErrors in the exception log, use MWLogger
Bug: T85795
Change-Id: Ic36f657a6447dd99c78681536e5dfb066d97b409
2015-03-18 15:45:29 +00:00
umherirrender
9c614ac02d Fixed some @params documentation
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.

Change-Id: I8c9f30128b46086064326708a4878228ba459447
2014-04-14 19:52:18 +00:00
addshore
557af13086 Split Exception.php
Change-Id: I8273b342f8814887b65227457d0a461d7cd31e75
2014-02-24 21:17:59 +01:00