From 457c38cc3a387f39e41d37e76617abcbfe763a2c Mon Sep 17 00:00:00 2001 From: Matthias Mullie Date: Thu, 27 Sep 2012 12:10:10 +0200 Subject: [PATCH] fix php notices Change-Id: I44ec2181ac7f2aea775f17c162838d52524084f8 --- AbuseFilter.class.php | 2 +- Views/AbuseFilterViewEdit.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php index 7e22bbd05..9e7b50cfc 100644 --- a/AbuseFilter.class.php +++ b/AbuseFilter.class.php @@ -1622,7 +1622,7 @@ class AbuseFilter { list( $row2, $actions2 ) = $version_2; foreach ( $compareFields as $field ) { - if ( $row1->$field != $row2->$field ) { + if ( !isset( $row2->$field ) || $row1->$field != $row2->$field ) { $differences[] = $field; } } diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php index c44673e75..1f1cffb00 100644 --- a/Views/AbuseFilterViewEdit.php +++ b/Views/AbuseFilterViewEdit.php @@ -344,7 +344,7 @@ class AbuseFilterViewEdit extends AbuseFilterView { 'default' ); - if ( $row->af_group ) { + if ( isset( $row->af_group ) && $row->af_group ) { $groupSelector->setDefault($row->af_group); } @@ -642,7 +642,7 @@ class AbuseFilterViewEdit extends AbuseFilterView { $warnMsg = $parameters[0]; } elseif ( $row && - $row->af_group && + isset( $row->af_group ) && $row->af_group && isset($wgAbuseFilterDefaultWarningMessage[$row->af_group] ) ) { $warnMsg = $wgAbuseFilterDefaultWarningMessage[$row->af_group];