summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Boyer2010-05-18 00:19:21 (GMT)
committer Sam Boyer2010-05-18 00:19:21 (GMT)
commit0fd920bcf38811fce36f4bc574883f7cfa32be70 (patch)
treeb08e6608d08f963d1646f18bd3de176fcb4cf3a9
parent3f903386a3aeab570b5d18ae8e633be98eb4b204 (diff)
Issue #758750 by mgriego, snufkin: Fix extra whitespace being added to
exported scalars.
-rw-r--r--includes/export.inc8
1 files changed, 2 insertions, 6 deletions
diff --git a/includes/export.inc b/includes/export.inc
index c6da05a..5fb661d 100644
--- a/includes/export.inc
+++ b/includes/export.inc
@@ -355,9 +355,9 @@ function ctools_var_export($var, $prefix = '') {
else {
$output = "array(\n";
foreach ($var as $key => $value) {
- $output .= " '$key' => " . ctools_var_export($value, ' ') . ",\n";
+ $output .= $prefix . " '$key' => " . ctools_var_export($value, $prefix . ' ') . ",\n";
}
- $output .= ')';
+ $output .= $prefix . ')';
}
}
else if (is_object($var) && get_class($var) === 'stdClass') {
@@ -374,10 +374,6 @@ function ctools_var_export($var, $prefix = '') {
$output = var_export($var, TRUE);
}
- if ($prefix) {
- $output = str_replace("\n", "\n$prefix", $output);
- }
-
return $output;
}