diff --git a/includes/ajax.inc b/includes/ajax.inc index d70808e..33e0f89 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -298,7 +298,7 @@ function ajax_render($commands = array()) { $settings = $scripts['settings']; // Automatically extract any settings added via drupal_add_js() and make // them the first command. - array_unshift($commands, ajax_command_settings(call_user_func_array('array_merge_recursive', $settings['data']), TRUE)); + array_unshift($commands, ajax_command_settings(call_user_func_array('drupal_array_merge_deep', $settings['data']), TRUE)); } // Allow modules to alter any Ajax response. diff --git a/modules/block/block.module b/modules/block/block.module index 4f498d3..8ccfb48 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -429,6 +429,7 @@ function _block_rehash($theme = NULL) { $block['weight'] = 0; } if (!empty($block['region']) && $block['region'] != BLOCK_REGION_NONE && !isset($regions[$block['region']])) { +//throw new Exception("Module: $module, Delta: $delta, Block: " . var_export($block, TRUE)); drupal_set_message(t('The block %info was assigned to the invalid region %region and has been disabled.', array('%info' => $block['info'], '%region' => $block['region'])), 'warning'); // Disabled modules are moved into the BLOCK_REGION_NONE later so no // need to move the bock to another region. @@ -835,7 +836,9 @@ function _block_render_blocks($region_blocks) { // Allow modules to modify the block before it is viewed, via either // hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter(). - drupal_alter(array('block_view', "block_view_{$block->module}_{$block->delta}"), $array, $block); + // Valid PHP function names cannot contain hyphens. + $delta = str_replace('-', '_', $block->delta); + drupal_alter(array('block_view', "block_view_{$block->module}_$delta"), $array, $block); if (isset($cid)) { cache_set($cid, $array, 'cache_block', CACHE_TEMPORARY); diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc index 6b172dd..fa10794 100644 --- a/modules/field/field.info.inc +++ b/modules/field/field.info.inc @@ -613,7 +613,9 @@ function field_info_fields() { * @see field_info_field_by_id() */ function field_info_field($field_name) { +field_info_cache_clear(); $info = _field_info_collate_fields(); + if (isset($info['field_ids'][$field_name])) { return $info['fields'][$info['field_ids'][$field_name]]; }