From 87b7dff6bb199901b4f44f56ad49d7f86e1c76b3 Mon Sep 17 00:00:00 2001
From: Mark Carver <mark.carver@me.com>
Date: Mon, 17 Apr 2017 03:07:30 -0500
Subject: [PATCH] Issue #2870289 by markcarver: file_ajax_upload() causes
 malformed Drupal.settings

---
 modules/file/file.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/file/file.module b/modules/file/file.module
index 18ed2654eb..d02c3df5ed 100644
--- a/modules/file/file.module
+++ b/modules/file/file.module
@@ -283,7 +283,7 @@ function file_ajax_upload() {
   $form['#prefix'] .= theme('status_messages');
   $output = drupal_render($form);
   $js = drupal_add_js();
-  $settings = call_user_func_array('array_merge_recursive', $js['settings']['data']);
+  $settings = call_user_func_array('drupal_array_merge_deep', $js['settings']['data']);
 
   $commands[] = ajax_command_replace(NULL, $output, $settings);
   return array('#type' => 'ajax', '#commands' => $commands);
-- 
2.12.0

