Merge "Make Special:MediaStatistics show a total count of file sizes"
[lhc/web/wiklou.git] / includes / specials / SpecialMovepage.php
index c267562..a1bd2fa 100644 (file)
@@ -802,7 +802,9 @@ class MovePageForm extends UnlistedSpecialPage {
         * @return string[] Matching subpages
         */
        public function prefixSearchSubpages( $search, $limit, $offset ) {
-               if ( $search === '' ) {
+               $title = Title::newFromText( $search );
+               if ( !$title || !$title->canExist() ) {
+                       // No prefix suggestion in special and media namespace
                        return array();
                }
                // Autocomplete subpage the same as a normal search