Title: Error: Undefined variable: mediafromftp
Last modified: December 2, 2016

---

# Error: Undefined variable: mediafromftp

 *  Resolved [franzastisch](https://wordpress.org/support/users/franzastisch/)
 * (@franzastisch)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-undefined-variable-mediafromftp/)
 * Hi, when trying to add images the progress bar never moves and just one image
   is added. With wordpress debuging enabled I get the following error:
    02-Dec-
   2016 22:01:08 UTC] PHP Notice: Undefined variable: mediafromftp in /wordpress/
   wp-content/plugins/media-from-ftp/inc/MediaFromFtp.php on line 725 [02-Dec-2016
   22:01:08 UTC] PHP Fatal error: Call to a member function mime_type() on null 
   in /wordpress/wp-content/plugins/media-from-ftp/inc/MediaFromFtp.php on line 
   725
 * looks like in the function output_html_and_log if $exif_text_tag is not empte(
   line 724) then in line 725 $mediafromftp->mime_type($ext) is called but $mediafromftp
   seems not to be defined anywhere.
    When I comment out the whole if everything
   works fine.
 * It would be great if you could have a look and get this fixed.
 * Thanks,
    franzastisch

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Katsushi Kawamori](https://wordpress.org/support/users/katsushi-kawamori/)
 * (@katsushi-kawamori)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-undefined-variable-mediafromftp/#post-8513556)
 * Hi franzastisch,
 * Thanks your hack!
 * Without commenting out, it should work with the following correction.
 * Line 725
    “before” `$mime_type = $mediafromftp->mime_type($ext);` “after” `$mime_type
   = $this->mime_type($ext);`
 * I will fix it in the next version.
    Thanks.
 *  Plugin Author [Katsushi Kawamori](https://wordpress.org/support/users/katsushi-kawamori/)
 * (@katsushi-kawamori)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/error-undefined-variable-mediafromftp/#post-8513585)
 * There is another fix.
 * Line 727
    “befor” $exif_text = $mediafromftp->exifcaption($attach_id, $metadata,
   $exif_text_tag); “after” $exif_text = $this->exifcaption($attach_id, $metadata,
   $exif_text_tag);
 *  Thread Starter [franzastisch](https://wordpress.org/support/users/franzastisch/)
 * (@franzastisch)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-mediafromftp/#post-8522009)
 * Cool, thanks vor the fast reply and fix!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error: Undefined variable: mediafromftp’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/media-from-ftp_d27e1b.svg)
 * [Media from FTP](https://wordpress.org/plugins/media-from-ftp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-from-ftp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-from-ftp/)
 * [Active Topics](https://wordpress.org/support/plugin/media-from-ftp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-from-ftp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-from-ftp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [franzastisch](https://wordpress.org/support/users/franzastisch/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-mediafromftp/#post-8522009)
 * Status: resolved