Skip to content

Commit

Permalink
This fixes #7. Use array_merge_recursive to combine metadata in outpu…
Browse files Browse the repository at this point in the history
…tformat process() function instead of array += operator, which can cause sections of the metadata to be lost. This was breaking drush_format in some instances, which broke the outputformat topic (e.g. for csv)
  • Loading branch information
greg-1-anderson committed Aug 22, 2013
1 parent 451ab38 commit a65f369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/core/outputformat.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class drush_outputformat {
* Perform pre-processing and then format() the $input.
*/
function process($input, $metadata = array()) {
$metadata += $this->engine_config;
$metadata = array_merge_recursive($metadata, $this->engine_config);
if (isset($metadata['private-fields']) && is_array($input)) {
if (!drush_get_option('show-passwords', FALSE)) {
if (!is_array($metadata['private-fields'])) {
Expand Down

0 comments on commit a65f369

Please sign in to comment.