As the summary says, sfDefineEnvironmentConfigHandler doesn't properly preserve arrays. Specifically, fixCategoryValue blindly calls replaceConstants, and if an array is passed to replaceConstants, the preg_replace it performs transforms the array into the literal text string 'Array', dropping the contents of the array on the floor in the process. The attached patch against the tagged RELEASE_0_6_0 should address this issue (at least it seems to work for me):
Index: lib/config/sfDefineEnvironmentConfigHandler.class.php
===================================================================
--- lib/config/sfDefineEnvironmentConfigHandler.class.php (revision 794)
+++ lib/config/sfDefineEnvironmentConfigHandler.class.php (working copy)
@@ -92,7 +92,25 @@
$key = strtolower($category.$key);
// replace constant values
- $value = $this->replaceConstants($value);
+ if (is_array($value))
+ {
+ foreach ($value as $temp_key => $temp_item)
+ {
+ if (is_array($temp_item))
+ {
+ list($return_key, $return_value) = $this->fixCategoryValue($category, $key, $temp_item);
+ $value[$temp_key] = $return_value;
+ }
+ else
+ {
+ $value[$temp_key] = $this->replaceConstants($temp_item);
+ }
+ }
+ }
+ else
+ {
+ $value = $this->replaceConstants($value);
+ }
return array($key, $value);
}