Glaisher has uploaded a new change for review.
https://gerrit.wikimedia.org/r/304973
Change subject: Check for null $title in
TranslateHooks::onAbuseFilterFilterAction
......................................................................
Check for null $title in TranslateHooks::onAbuseFilterFilterAction
Although it's supposed to be a Title object and documented as such,
this is likely passed null sometimes. There are several places where
AbuseFilter::filterAction is called so just do this check on our side
and see whether this fixes T143073.
Bug: T143073
Change-Id: I1d011c54fc4c90fb34592b5d59d65176b8c41b88
---
M TranslateHooks.php
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate
refs/changes/73/304973/1
diff --git a/TranslateHooks.php b/TranslateHooks.php
index 5f35cd2..5d8180c 100644
--- a/TranslateHooks.php
+++ b/TranslateHooks.php
@@ -241,9 +241,13 @@
* Used for setting an AbuseFilter variable.
*
* @param AbuseFilterVariableHolder &$vars
- * @param Title $title
+ * @param Title|null $title
*/
public static function onAbuseFilterFilterAction( &$vars, $title ) {
+ if ( !$title instanceof Title ) {
+ return;
+ }
+
$handle = new MessageHandle( $title );
// Only set this variable if we are in a proper namespace to
avoid
--
To view, visit https://gerrit.wikimedia.org/r/304973
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d011c54fc4c90fb34592b5d59d65176b8c41b88
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits