-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Message:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in ...\components\com_attachments\src\Helper\AttachmentsHelper.php on line 642
In this line 642: $illegal_mime = explode(',', $cmparams->get('upload_mime_illegal'));
upload_mime_illegal key doesn't exits in params of com_media componenet of Joomla 5 (see content of params for J5 #63)
and the line 642 must delete and in the line 643 delete the reference too.
The fix code (see in the commit by PR):
if ( $cmparams->get('check_mime', true) ) {
$allowed_mime = explode(',', $cmparams->get('upload_mime'));
if ( StringHelper::strlen($ftype) && !in_array($ftype, $allowed_mime)) {
$error = 'illegal_mime_type';
$error_msg = Text::sprintf('ATTACH_ERROR_UPLOADING_FILE_S', $filename);
$error_msg .= ', ' . Text::_('ATTACH_ERROR_ILLEGAL_FILE_MIME_TYPE') . " $ftype";
if ($user->authorise('core.admin')) {
$error_msg .= " <br />" . Text::_('ATTACH_ERROR_CHANGE_IN_MEDIA_MANAGER');
}
}
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
