diff options
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |