Avoid 'undefined index' notices
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 24 Nov 2004 22:31:48 +0000 (22:31 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 24 Nov 2004 22:31:48 +0000 (22:31 +0000)
includes/Title.php

index 7f019f7..8d9ab03 100644 (file)
@@ -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();
        }
        
        /**