Make WordPress Core

Ticket #33371: movabletype-importer.php.diff

File movabletype-importer.php.diff, 780 bytes (added by mt8.biz, 9 years ago)
  • trunk/movabletype-importer.php

     
    239239        }
    240240
    241241        function select_authors() {
    242                 if ( $_POST['upload_type'] === 'ftp' ) {
     242                if ( isset( $_POST['upload_type'] ) && $_POST['upload_type'] === 'ftp' ) {
    243243                        $file['file'] = WP_CONTENT_DIR . '/mt-export.txt';
    244244                        if ( !file_exists($file['file']) )
    245245                                $file['error'] = __('<code>mt-export.txt</code> does not exist', 'movabletype-importer');
     
    254254                        return;
    255255                }
    256256                $this->file = $file['file'];
    257                 $this->id = (int) $file['id'];
     257                $this->id = ( isset( $file['id'] ) ) ? (int) $file['id'] : 0;
    258258
    259259                $this->mt_authors_form();
    260260        }