Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
node.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
5 Feb 2011 at 06:52 UTC
Updated:
29 Jul 2014 at 19:21 UTC
Jump to comment: Most recent file
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 commentedComment #2
boombatower commentedCommit to 8.x and backport.
Comment #3
robloach#1: 1051870-double-init.patch queued for re-testing.
Comment #4
boombatower commentedHopefully this isn't a stretch.
Comment #5
tstoeckler+1 on RTBC.
Comment #6
dries commentedGood catch. Committed to 7.x and 8.x.