Commit 97bc9fb8 authored by webchick's avatar webchick
Browse files

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

Issue #348448 follow-up by jrchamp, catch: Fix E_STRICT errors and set Drupal 8's default error reporting to E_STRICT to prevent further regressions.
parent 357e34c6
......@@ -483,8 +483,8 @@ function drupal_environment_initialize() {
// e.g. "&" or "%" that have special meanings in URLs and must be encoded.
$_GET['q'] = request_path();
// Enforce E_ALL, but allow users to set levels not part of E_ALL.
error_reporting(E_ALL | error_reporting());
// Enforce E_STRICT, but allow users to set levels not part of E_STRICT.
error_reporting(E_STRICT | E_ALL | error_reporting());
// Override PHP settings required for Drupal to work properly.
// sites/default/default.settings.php contains more runtime settings.
......
......@@ -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);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment