From d0f8f90a364fb1ab6253e9e2cfa42ecd57cc6c3b Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 3 Nov 2008 05:55:57 +0000 Subject: #303889 by David_Rothstein, kbahey, and chx: Make it possible to update D6 -> D7. --- modules/node/node.module | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 473eb857d..eed4cf34a 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -594,8 +594,9 @@ function _node_types_build() { while ($type_object = db_fetch_object($type_result)) { // Check for node types from disabled modules and mark their types for removal. // Types defined by the node module in the database (rather than by a separate - // module using hook_node_info) have a base value of 'node_content'. - if ($type_object->base != 'node_content' && empty($info_array[$type_object->type])) { + // module using hook_node_info) have a base value of 'node_content'. The isset() + // check prevents errors on old (pre-Drupal 7) databases. + if (isset($type_object->base) && $type_object->base != 'node_content' && empty($info_array[$type_object->type])) { $type_object->disabled = TRUE; } if (!isset($_node_types[$type_object->type]) || $type_object->modified) { -- cgit v1.2.3