summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialRandompage.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialRandompage.php')
-rw-r--r--includes/specials/SpecialRandompage.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php
index f4bff30b..31199b23 100644
--- a/includes/specials/SpecialRandompage.php
+++ b/includes/specials/SpecialRandompage.php
@@ -23,7 +23,7 @@ class RandomPage extends SpecialPage {
}
public function setNamespace ( $ns ) {
- if( $ns < NS_MAIN ) $ns = NS_MAIN;
+ if( !$ns || $ns < NS_MAIN ) $ns = NS_MAIN;
$this->namespaces = array( $ns );
}