Fixed Attachment handler should use validator

Kirby

Well-known member
Affected version
2.1.8
In Method \XFMG\Attachment\Media::validateAttachmentUpload() XFMG options are being checked directly, although \XFMG\Validator\Ffmpeg does exist.

PHP:
if (!$ffmpegOptions['ffmpegPath'] || !$ffmpegOptions['transcode'])
{
    $upload->logError('xfmgCannotTranscode', \XF::phrase('xfmg_this_file_is_not_encoded_in_supported_format_and_cannot_be_transcoded'));
}

This is a bit unfortunate, as we are using a custom runner that does not require a valid FFMPEG path (in fact it doesn't require one at all as trancoding is being forked out to a different machine).

So I either need to fake the option or overwrite the method completely.

If it did use the existing validator things could be done in a cleaner way :)
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XFMG release (2.2.5).

Change log:
Use validator to verify ffmpeg path in media attachment handler
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom