diff options
Diffstat (limited to 'includes/Categoryfinder.php')
-rw-r--r-- | includes/Categoryfinder.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/Categoryfinder.php b/includes/Categoryfinder.php index 4413bd1a..7c1c2856 100644 --- a/includes/Categoryfinder.php +++ b/includes/Categoryfinder.php @@ -53,9 +53,11 @@ class Categoryfinder { # Set the list of target categories; convert them to DBKEY form first $this->targets = array () ; foreach ( $categories AS $c ) { - $ct = Title::newFromText ( $c , NS_CATEGORY ) ; - $c = $ct->getDBkey () ; - $this->targets[$c] = $c ; + $ct = Title::makeTitleSafe( NS_CATEGORY, $c ); + if( $ct ) { + $c = $ct->getDBkey(); + $this->targets[$c] = $c; + } } } |