bug #12308 Ensure that Twig form themes are always a list, not a hashmap (stof)

This PR was merged into the 2.6-dev branch.

Discussion
----------

Ensure that Twig form themes are always a list, not a hashmap

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12305
| License       | MIT
| Doc PR        | n/a

array_unique does not reindex arrays when deleting keys.

Commits
-------

2a19cd8 Ensure that Twig form themes are always a list, not a hashmap
This commit is contained in:
Fabien Potencier 2014-10-24 11:00:07 +02:00
commit 23f0411a40

View File

@ -54,7 +54,7 @@ class Configuration implements ConfigurationInterface
return count($v['form']['resources']) > 0;
})
->then(function ($v) {
$v['form_themes'] = array_unique(array_merge($v['form']['resources'], $v['form_themes']));
$v['form_themes'] = array_values(array_unique(array_merge($v['form']['resources'], $v['form_themes'])));
return $v;
})