From 428d19f34ece9654b0900e74224370e8dd3f696d Mon Sep 17 00:00:00 2001 From: Tristan Olive <tristan.olive@studiodelta.us> Date: Mon, 12 Oct 2015 13:40:09 -0400 Subject: [PATCH] Drupal: Fix E_STRICT issues with PHP 5.4+ in contrib modules Variable reference issues cause problems in PHP version higher than 5.3. The cck, content_profile, ctools, and panels modules need to be overridden to patch these issues, as no fixes are available in module releases. (DBOINC-146) --- .../includes/views/handlers/content_handler_field_multiple.inc | 2 +- .../contrib/content_profile/content_profile.rules_defaults.inc | 3 ++- .../plugins/views/views_content_plugin_display_panel_pane.inc | 2 +- .../sites/default/boinc/modules/contrib/panels/panels.module | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drupal/sites/default/boinc/modules/contrib/cck/includes/views/handlers/content_handler_field_multiple.inc b/drupal/sites/default/boinc/modules/contrib/cck/includes/views/handlers/content_handler_field_multiple.inc index bd31e24f7b..f388d66226 100644 --- a/drupal/sites/default/boinc/modules/contrib/cck/includes/views/handlers/content_handler_field_multiple.inc +++ b/drupal/sites/default/boinc/modules/contrib/cck/includes/views/handlers/content_handler_field_multiple.inc @@ -127,7 +127,7 @@ class content_handler_field_multiple extends content_handler_field { $this->field_alias = $this->aliases['vid']; } - function pre_render($values) { + function pre_render(&$values) { // If there are no values to render (displaying a summary, or query returned no results), // or if this is not a grouped field, do nothing specific. if (isset($this->view->build_info['summary']) || empty($values) || !$this->defer_query) { diff --git a/drupal/sites/default/boinc/modules/contrib/content_profile/content_profile.rules_defaults.inc b/drupal/sites/default/boinc/modules/contrib/content_profile/content_profile.rules_defaults.inc index b623755bd2..7c10ca05e8 100644 --- a/drupal/sites/default/boinc/modules/contrib/content_profile/content_profile.rules_defaults.inc +++ b/drupal/sites/default/boinc/modules/contrib/content_profile/content_profile.rules_defaults.inc @@ -10,7 +10,8 @@ * no profile. */ function content_profile_rules_defaults() { - $type = array_shift(array_keys(content_profile_get_types('names'))); + $types = array_keys(content_profile_get_types('names')); + $type = array_shift($types); $config = array ( 'rules' => diff --git a/drupal/sites/default/boinc/modules/contrib/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc b/drupal/sites/default/boinc/modules/contrib/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc index 7d08130751..a7bcb95b07 100644 --- a/drupal/sites/default/boinc/modules/contrib/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc +++ b/drupal/sites/default/boinc/modules/contrib/ctools/views_content/plugins/views/views_content_plugin_display_panel_pane.inc @@ -317,7 +317,7 @@ class views_content_plugin_display_panel_pane extends views_plugin_display { * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - function options_submit($form, &$form_state) { + function options_submit(&$form, &$form_state) { // It is very important to call the parent function here: parent::options_submit($form, $form_state); switch ($form_state['section']) { diff --git a/drupal/sites/default/boinc/modules/contrib/panels/panels.module b/drupal/sites/default/boinc/modules/contrib/panels/panels.module index d24b9bca4d..87ec704120 100644 --- a/drupal/sites/default/boinc/modules/contrib/panels/panels.module +++ b/drupal/sites/default/boinc/modules/contrib/panels/panels.module @@ -1124,7 +1124,7 @@ function panels_get_current_page_display($change = NULL) { /** * Clean up the panel pane variables for the template. */ -function template_preprocess_panels_pane($vars) { +function template_preprocess_panels_pane(&$vars) { $content = $vars['output']; // basic classes $vars['classes'] = 'panel-pane'; -- GitLab