• Resolved franzastisch

    (@franzastisch)


    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

    (@katsushi-kawamori)

    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

    (@katsushi-kawamori)

    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

    (@franzastisch)

    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.