From 4c795a7191f91fdc6b118c141903b200e6761cb8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 24 Nov 2004 22:31:48 +0000 Subject: [PATCH] Avoid 'undefined index' notices --- includes/Title.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 7f019f7cc8..8d9ab0320d 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -915,8 +915,10 @@ class Title { $res = $dbr->selectField( 'cur', 'cur_restrictions', 'cur_id='.$id ); $this->loadRestrictions( $res ); } - $result = $this->mRestrictions[$action]; - return $result ? $result : array(); + if( isset( $this->mRestrictions[$action] ) ) { + return $this->mRestrictions[$action]; + } + return array(); } /** -- 2.20.1