Commit a5184846 authored by Dave Reid's avatar Dave Reid

Issue #1955992 by bangpound, Dave Reid: Fixed view mode corruption caused by...

Issue #1955992 by bangpound, Dave Reid: Fixed view mode corruption caused by reassigning referenced variables.
parent 4264c395
...@@ -52,10 +52,10 @@ function entity_view_mode_entity_info_alter(&$info) { ...@@ -52,10 +52,10 @@ function entity_view_mode_entity_info_alter(&$info) {
// Because entity_get_info() merges in the default 'custom settings' value // Because entity_get_info() merges in the default 'custom settings' value
// before it invokes hook_entity_info_alter(), we need to make sure that the // before it invokes hook_entity_info_alter(), we need to make sure that the
// custom view modes also have this value defined. // custom view modes also have this value defined.
foreach ($view_mode_info as $entity_type => &$view_modes) { foreach ($view_mode_info as $entity_type => $view_modes) {
foreach ($view_modes as &$view_mode) { foreach (array_keys($view_modes) as $view_mode) {
// @todo Should this default to TRUE? // @todo Should this default to TRUE?
$view_mode += array('custom settings' => FALSE); $view_mode_info[$entity_type][$view_mode] += array('custom settings' => FALSE);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment