Commit 3b215f2f authored by Sagar Ramgade's avatar Sagar Ramgade Committed by joseph.olstad

Issue #2612190 by Sagar Ramgade, derek.deraps, stefan.r: Array_merge error on...

Issue #2612190 by Sagar Ramgade, derek.deraps, stefan.r: Array_merge error on media.install update to 2.x
parent 15c13406
......@@ -869,7 +869,12 @@ function media_update_7208() {
// Merge existing type with new ones.
if ($new_type = file_type_load($type->name)) {
$new_type->mimetypes = array_merge($type->mimetypes, $new_type->mimetypes);
$new_type->streams = array_merge($type->streams, $new_type->streams);
if (!empty($new_type->streams)) {
$new_type->streams = array_merge($type->streams, $new_type->streams);
}
else{
$new_type->streams = $type->streams;
}
}
else {
$new_type = $type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment