diff --git a/includes/datastream.version.inc b/includes/datastream.version.inc
index 515094bd..83a94aef 100644
--- a/includes/datastream.version.inc
+++ b/includes/datastream.version.inc
@@ -289,7 +289,7 @@ function islandora_datastream_version_replace_form($form, &$form_state, Abstract
$ext = array_merge($ext, $extensions);
}
}
-
+ $valid_extensions = implode(' ', $ext);
$upload_size = min((int) ini_get('post_max_size'), (int) ini_get('upload_max_filesize'));
return array(
'dsid_fieldset' => array(
@@ -313,7 +313,7 @@ function islandora_datastream_version_replace_form($form, &$form_state, Abstract
'#description' => t('Select a file to upload.
Files must be less than @size MB.', array('@size' => $upload_size)),
'#upload_location' => 'temporary://',
'#upload_validators' => array(
- 'file_validate_extensions' => $ext,
+ 'file_validate_extensions' => array($valid_extensions),
// Assume its specified in MB.
'file_validate_size' => array($upload_size * 1024 * 1024),
),