From dcb84edcda3d04fa9fdf2d2b4ef78170c22e61fb Mon Sep 17 00:00:00 2001 From: Axel Rutz Date: Sat, 4 Jan 2014 01:07:22 +0100 Subject: [PATCH] Fixed #2103079: Rules metadata assertions for list types broken --- includes/rules.state.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/rules.state.inc b/includes/rules.state.inc index a4150e7..98ef016 100644 --- a/includes/rules.state.inc +++ b/includes/rules.state.inc @@ -508,10 +508,9 @@ class RulesData { // before the child-wrapper is created. if (count($parts) == 1) { // Support asserting a type in case of generic entity references only. - if (isset($assertion['type']) && $var_info[$parts[0]]['type'] == 'entity') { - if (entity_get_info($assertion['type'])) { - $var_info[$parts[0]]['type'] = $assertion['type']; - } + $var_type = &$var_info[$parts[0]]['type']; + if (isset($assertion['type']) && ($var_type == 'entity' || $var_type == 'list')) { + $var_type = $assertion['type']; unset($assertion['type']); } // Add any single bundle directly to the variable info, so the -- 1.7.9.5