Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
function node_type_save($info) {
$is_existing = FALSE;
$existing_type = !empty($info->old_type) ? $info->old_type : $info->type;
$is_existing = (bool) db_query_range('SELECT 1 FROM {node_type} WHERE type = :type', 0, 1, array(':type' => $existing_type))->fetchField();
$type = node_type_set_defaults($info);
Note $is_existing
is initialized to FALSE and then set to the result of db_query_range()
.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1051870-double-init.patch | 767 bytes | boombatower |
Comments
Comment #1
boombatower CreditAttribution: boombatower commentedComment #2
boombatower CreditAttribution: boombatower commentedCommit to 8.x and backport.
Comment #3
RobLoach#1: 1051870-double-init.patch queued for re-testing.
Comment #4
boombatower CreditAttribution: boombatower commentedHopefully this isn't a stretch.
Comment #5
tstoeckler+1 on RTBC.
Comment #6
Dries CreditAttribution: Dries commentedGood catch. Committed to 7.x and 8.x.