Merge "SpecialMovepage: Convert form to use OOUI controls"
[lhc/web/wiklou.git] / includes / upload / UploadBase.php
index 493df2e..b06b91e 100644 (file)
@@ -752,6 +752,12 @@ abstract class UploadBase {
                if ( $this->mTitle !== false ) {
                        return $this->mTitle;
                }
+               if ( !is_string( $this->mDesiredDestName ) ) {
+                       $this->mTitleError = self::ILLEGAL_FILENAME;
+                       $this->mTitle = null;
+
+                       return $this->mTitle;
+               }
                /* Assume that if a user specified File:Something.jpg, this is an error
                 * and that the namespace prefix needs to be stripped of.
                 */