Commit 428d19f3 authored by Tristan Olive's avatar Tristan Olive
Browse files

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)
parent 42bde318
...@@ -127,7 +127,7 @@ class content_handler_field_multiple extends content_handler_field { ...@@ -127,7 +127,7 @@ class content_handler_field_multiple extends content_handler_field {
$this->field_alias = $this->aliases['vid']; $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), // 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. // or if this is not a grouped field, do nothing specific.
if (isset($this->view->build_info['summary']) || empty($values) || !$this->defer_query) { if (isset($this->view->build_info['summary']) || empty($values) || !$this->defer_query) {
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
* no profile. * no profile.
*/ */
function content_profile_rules_defaults() { 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 = $config =
array ( array (
'rules' => 'rules' =>
......
...@@ -317,7 +317,7 @@ class views_content_plugin_display_panel_pane extends views_plugin_display { ...@@ -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. * Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data. * 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: // It is very important to call the parent function here:
parent::options_submit($form, $form_state); parent::options_submit($form, $form_state);
switch ($form_state['section']) { switch ($form_state['section']) {
......
...@@ -1124,7 +1124,7 @@ function panels_get_current_page_display($change = NULL) { ...@@ -1124,7 +1124,7 @@ function panels_get_current_page_display($change = NULL) {
/** /**
* Clean up the panel pane variables for the template. * Clean up the panel pane variables for the template.
*/ */
function template_preprocess_panels_pane($vars) { function template_preprocess_panels_pane(&$vars) {
$content = $vars['output']; $content = $vars['output'];
// basic classes // basic classes
$vars['classes'] = 'panel-pane'; $vars['classes'] = 'panel-pane';
......
Supports Markdown
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