summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-07-13 21:49:41 -0400
committerwebchick <webchick@24967.no-reply.drupal.org>2011-07-13 21:49:41 -0400
commitc69b525c382bd24d389e56af3033d5a82051aab1 (patch)
tree27e524eb45f316d2a84203a14fb5cf483506f3d5
parentf2d2cf8a85df17c6c3bef236a8db147739529259 (diff)
downloadbrdo-c69b525c382bd24d389e56af3033d5a82051aab1.tar.gz
brdo-c69b525c382bd24d389e56af3033d5a82051aab1.tar.bz2
Issue #348448 follow-up by jrchamp, catch: Fix E_STRICT errors.
-rw-r--r--modules/field_ui/field_ui.test3
-rw-r--r--modules/poll/poll.module4
-rw-r--r--modules/profile/profile.module1
-rw-r--r--modules/search/tests/search_embedded_form.module3
4 files changed, 9 insertions, 2 deletions
diff --git a/modules/field_ui/field_ui.test b/modules/field_ui/field_ui.test
index 5d2ff9bfa..9ff6c1720 100644
--- a/modules/field_ui/field_ui.test
+++ b/modules/field_ui/field_ui.test
@@ -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.
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index f45b8bda7..561e160c4 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -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')
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 2374fe8ea..1da4c6f47 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -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;
diff --git a/modules/search/tests/search_embedded_form.module b/modules/search/tests/search_embedded_form.module
index c0058f74d..484579674 100644
--- a/modules/search/tests/search_embedded_form.module
+++ b/modules/search/tests/search_embedded_form.module
@@ -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);
}