Issue #2009014 follow-up by StephaneQ: Replace one more theme() with drupal_render() in file module.

8.0.x
Alex Pott 2013-08-04 21:30:57 +02:00
parent 9614f73399
commit 8b7bc0c7b1
1 changed files with 5 additions and 1 deletions

View File

@ -913,7 +913,11 @@ function file_save_upload($form_field_name, $validators = array(), $destination
if (!empty($errors)) {
$message = t('The specified file %name could not be uploaded.', array('%name' => $file->getFilename()));
if (count($errors) > 1) {
$message .= theme('item_list', array('items' => $errors));
$item_list = array(
'#theme' => 'item_list',
'#items' => $errors,
);
$message .= drupal_render($item_list);
}
else {
$message .= ' ' . array_pop($errors);