diff -u b/handlers/views_handler_relationship_groupwise_max.inc b/handlers/views_handler_relationship_groupwise_max.inc --- b/handlers/views_handler_relationship_groupwise_max.inc +++ b/handlers/views_handler_relationship_groupwise_max.inc @@ -280,7 +280,7 @@ // Clone the query object to force recompilation of the underlying where and // having objects on the next step. $subquery = clone $subquery; - + // Add in Views Query Substitutions such as ***CURRENT_TIME***. views_query_views_alter($subquery); @@ -294,9 +294,10 @@ if (is_array($val)) { $quoted[$key] = implode(', ', array_map(array($connection, 'quote'), $val)); } - // If the correlated placeholder has been located, replace it with the outer field name. + // If the correlated placeholder has been located, replace it with the + // outer field name. elseif ($val === '**CORRELATED**') { - $quoted[$key] = $this->definition['outer field']; + $quoted[$key] = $this->definition['outer field']; } else { $quoted[$key] = $connection->quote($val);