Skip to content
Snippets Groups Projects
Commit c69b525c authored by Angie Byron's avatar Angie Byron
Browse files

Issue #348448 follow-up by jrchamp, catch: Fix E_STRICT errors.

parent f2d2cf8a
No related branches found
No related tags found
No related merge requests found
......@@ -613,7 +613,8 @@ class FieldUIManageDisplayTestCase extends FieldUITestCase {
// Render a cloned node, so that we do not alter the original.
$clone = clone $node;
$output = drupal_render(node_view($clone, $view_mode));
$element = node_view($clone, $view_mode);
$output = drupal_render($element);
$this->verbose(t('Rendered node - view mode: @view_mode', array('@view_mode' => $view_mode)) . '<hr />'. $output);
// Assign content so that DrupalWebTestCase functions can be used.
......
......@@ -485,6 +485,10 @@ function poll_load($nodes) {
foreach ($nodes as $node) {
$poll = db_query("SELECT runtime, active FROM {poll} WHERE nid = :nid", array(':nid' => $node->nid))->fetchObject();
if (empty($poll)) {
$poll = new stdClass;
}
// Load the appropriate choices into the $poll object.
$poll->choice = db_select('poll_choice', 'c')
->addTag('translatable')
......
......@@ -544,6 +544,7 @@ function template_preprocess_profile_block(&$variables) {
// Supply filtered version of $fields that have values.
foreach ($variables['fields'] as $field) {
if ($field->value) {
$variables['profile'][$field->name] = new stdClass;
$variables['profile'][$field->name]->title = check_plain($field->title);
$variables['profile'][$field->name]->value = $field->value;
$variables['profile'][$field->name]->type = $field->type;
......
......@@ -65,5 +65,6 @@ function search_embedded_form_form_submit($form, &$form_state) {
* Adds the test form to search results.
*/
function search_embedded_form_preprocess_search_result(&$variables) {
$variables['snippet'] .= drupal_render(drupal_get_form('search_embedded_form_form'));
$form = drupal_get_form('search_embedded_form_form');
$variables['snippet'] .= drupal_render($form);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment