diff --git a/views_field_view_handler_field_view.inc b/views_field_view_handler_field_view.inc index c904362..3cd6a3f 100644 --- a/views_field_view_handler_field_view.inc +++ b/views_field_view_handler_field_view.inc @@ -358,20 +358,8 @@ class views_field_view_handler_field_view extends views_handler_field { $output = NULL; // If it's not a field handler and there are no values // Get the first result row from the view and use that. - if ($this->handler_type !== 'field') { - if (empty($values) && isset($this->view->result)) { - $values = reset($this->view->result); - } - // The render function needs an object to handle, so we convert the - // array to an object, - elseif (is_array($values)) { - $values = (object) $values; - } - // If we did not get an object as values, we will provide an empty one, so - // we at least do not get ugly warnings when processing this render. - elseif (!is_object($values)) { - $values = (empty($this->view->result)) ? new stdClass() : reset($this->view->result); - } + if ($this->handler_type !== 'field' && !is_object($values)) { + $values = (empty($this->view->result)) ? (object) $values : reset($this->view->result); } static $running = array();