From: Brion Vibber Date: Wed, 24 Nov 2004 22:31:48 +0000 (+0000) Subject: Avoid 'undefined index' notices X-Git-Tag: 1.5.0alpha1~1249 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=4c795a7191f91fdc6b118c141903b200e6761cb8;p=lhc%2Fweb%2Fwiklou.git Avoid 'undefined index' notices --- 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(); } /**