mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
ViewEdit: add af_id to the row
A PHP notice is sporadically emitted in production, e.g. reqId XlVEMgpAMNAAA6zMVhQAAACV Change-Id: Ie42d00c6520aa31daf127c5df9515a3ab01d986f
This commit is contained in:
parent
58d531861c
commit
fe28aff82a
|
@ -1241,6 +1241,7 @@ class AbuseFilterViewEdit extends AbuseFilterView {
|
|||
if ( $filter !== 'new' ) {
|
||||
// These aren't needed when saving the filter, but they are otherwise (e.g. if
|
||||
// saving fails and we need to show the edit interface again).
|
||||
$row->af_id = $origRow->af_id;
|
||||
$row->af_user = $origRow->af_user;
|
||||
$row->af_user_text = $origRow->af_user_text;
|
||||
$row->af_timestamp = $origRow->af_timestamp;
|
||||
|
|
|
@ -104,7 +104,7 @@ class AbuseFilterSaveTest extends MediaWikiTestCase {
|
|||
->getMock();
|
||||
|
||||
if ( $existing ) {
|
||||
$origValues = [ (object)self::$defaultFilterRow, [] ];
|
||||
$origValues = [ (object)( self::$defaultFilterRow + [ 'af_id' => 1 ] ), [] ];
|
||||
} else {
|
||||
$origValues = [
|
||||
(object)[
|
||||
|
|
Loading…
Reference in a new issue