diff --git a/includes/plugins.inc b/includes/plugins.inc index 46baaca..b470668 100644 --- a/includes/plugins.inc +++ b/includes/plugins.inc @@ -173,9 +173,12 @@ class panels_cache_object { $start = $this->js; $this->js = array(); + // Use the advanced mapping function from Drupal >= 7.23 if available. + $array_mapping_func = function_exists('drupal_array_diff_assoc_recursive') ? 'drupal_array_diff_assoc_recursive' : 'array_diff_assoc'; + // If there are any differences between the old and the new javascript then // store them to be added later. - if ($diff = drupal_array_diff_assoc_recursive($js, $start)) { + if ($diff = $array_mapping_func($js, $start)) { // Iterate over the diff to ensure we keep the keys on merge and don't add // unnecessary items. foreach ($diff as $key => $diff_data) { diff --git a/panels.info b/panels.info index 5aa334b..70b961d 100644 --- a/panels.info +++ b/panels.info @@ -4,7 +4,6 @@ core = 7.x package = "Panels" configure = admin/structure/panels dependencies[] = ctools -dependencies[] = system (>=7.23) files[] = panels.module files[] = includes/common.inc files[] = includes/legacy.inc