mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 21:53:35 +00:00
Don't create default object from empty value in AbuseFilterHooks
We shouldn't try to set the attribute of a variable which isn't actually an object as this will lead to the "Creating default object from empty value" PHP error and it will trigger a further fatal down the road. This gets triggered in Wikibase and probably other extension unit tests. Change-Id: I0f2e93657e5cfdb84ee351be371d421c11291b82
This commit is contained in:
parent
2fcb9e51df
commit
150bf280cb
|
@ -132,8 +132,9 @@ class AbuseFilterHooks {
|
|||
// Some edits are running through multiple hooks, but we only want to filter them once
|
||||
if ( isset( $title->editAlreadyFiltered ) ) {
|
||||
return true;
|
||||
} elseif ( $title ) {
|
||||
$title->editAlreadyFiltered = true;
|
||||
}
|
||||
$title->editAlreadyFiltered = true;
|
||||
|
||||
self::$successful_action_vars = false;
|
||||
self::$last_edit_page = false;
|
||||
|
|
Loading…
Reference in a new issue