Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.443
diff -u -p -r1.443 system.module
--- modules/system/system.module	24 Jan 2007 14:48:36 -0000	1.443
+++ modules/system/system.module	24 Jan 2007 19:53:19 -0000
@@ -354,7 +354,10 @@ function system_main_admin_page($arg = N
   usort($menu['children'], '_menu_sort');
   foreach ($menu['children'] as $mid) {
     $block = menu_get_item($mid);
-    if ($block['block callback'] && function_exists($block['block callback'])) {
+    if (!isset($block['content'])) {
+      $block['content'] = '';
+    }
+    if (isset($block['block callback']) && function_exists($block['block callback'])) {
       $arguments = isset($block['block arguments']) ? $block['block arguments'] : array();
       $block['content'] .= call_user_func_array($block['block callback'], $arguments);
     }
@@ -371,7 +374,7 @@ function system_main_admin_page($arg = N
 function system_admin_menu_block($block) {
   return 'This page awaits rewrite'; // TODO: this needs to be rewritten for the new menu system.
   $content = array();
-  if (is_array($block['children'])) {
+  if (isset($block['children']) && is_array($block['children'])) {
     usort($block['children'], '_menu_sort');
     foreach ($block['children'] as $mid) {
       $item = menu_get_item($mid);
@@ -949,7 +952,7 @@ function system_theme_data() {
       $style->template = isset($theme->template) ? $theme->template : FALSE;
       $style->name = basename(dirname($style->filename));
       $style->owner = $theme->filename;
-      $style->prefix = $theme->template ? $theme->prefix : $theme->name;
+      $style->prefix = isset($theme->template) ? $theme->prefix : $theme->name;
       // do not double-insert styles with theme files in their directory
       if (array_key_exists($style->name, $themes)) {
         continue;
@@ -1160,7 +1163,7 @@ function system_themes() {
 function theme_system_themes($form) {
   foreach (element_children($form) as $key) {
     $row = array();
-    if (is_array($form[$key]['description'])) {
+    if (isset($form[$key]['description']) && is_array($form[$key]['description'])) {
       $row[] = drupal_render($form[$key]['screenshot']);
       $row[] = drupal_render($form[$key]['description']);
       $row[] = array('data' => drupal_render($form['status'][$key]), 'align' => 'center');
@@ -1286,7 +1289,7 @@ function system_modules($form_values = N
 
     // Mark dependents disabled so user can not remove modules being depended on.
     $dependents = array();
-    if (is_array($file->info['dependents'])) {
+    if (isset($file->info['dependents']) && is_array($file->info['dependents'])) {
       foreach ($file->info['dependents'] as $dependent) {
         if ($files[$dependent]->status == 1) {
           $dependents[] = $files[$dependent]->info['name'] . t(' (<span class="admin-enabled">enabled</span>)');
@@ -1835,7 +1838,7 @@ function system_status($check = FALSE) {
  * Helper function to sort requirements.
  */
 function _system_sort_requirements($a, $b) {
-  return (isset($a['weight']) || isset($b['weight'])) ? $a['weight'] - $b['weight'] : strcmp($a['title'], $b['title']);
+  return (isset($a['weight']) && isset($b['weight'])) ? $a['weight'] - $b['weight'] : strcmp($a['title'], $b['title']);
 }
 
 /**
@@ -2168,7 +2171,7 @@ function system_admin_compact_mode() {
  */
 function theme_admin_page($blocks) {
   $stripe = 0;
-  $container = array();
+  $container = array('left' => '', 'right' => '');
 
   foreach ($blocks as $block) {
     if ($block_output = theme('admin_block', $block)) {
@@ -2323,7 +2326,7 @@ function system_get_module_admin_tasks($
 function theme_system_admin_by_module($menu_items) {
   $stripe = 0;
   $output = '';
-  $container = array();
+  $container = array('left' => '', 'right' => '');
 
   // Iterate over all modules
   foreach ($menu_items as $module => $block) {
@@ -2337,7 +2340,7 @@ function theme_system_admin_by_module($m
       $block['description'] = t($description);
 
       if ($block_output = theme('admin_block', $block)) {
-        if (!$block['position']) {
+        if (!isset($block['position'])) {
           // Perform automatic striping.
           $block['position'] = ++$stripe % 2 ? 'left' : 'right';
         }
