Skip to content
Snippets Groups Projects
Commit ba15b28e authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #80963 by Dries et al: fixed race condition in _block_rehash().

parent 757ac966
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -146,6 +146,8 @@ function _block_rehash() {
init_theme();
db_lock_table('blocks');
$result = db_query("SELECT * FROM {blocks} WHERE theme = '%s'", $theme_key);
while ($old_block = db_fetch_object($result)) {
$old_blocks[$old_block->module][$old_block->delta] = $old_block;
......@@ -185,7 +187,6 @@ function _block_rehash() {
}
}
db_lock_table('blocks');
// Remove all blocks from table.
db_query("DELETE FROM {blocks} WHERE theme = '%s'", $theme_key);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment