diff --git a/ChangeLog b/ChangeLog index 532243143..242079d69 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ $Source$ 2006-03-26 Marc Delisle * sql.php: bug #1448890 Column expander doesn't work + * libraries/tbl_properties.inc.php: bug #1458334, undefined offset 2006-03-25 Marc Delisle * db_operations.php, libraries/Table.class.php, diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php index b6d96b3d6..4e934d3ef 100644 --- a/libraries/tbl_properties.inc.php +++ b/libraries/tbl_properties.inc.php @@ -226,7 +226,7 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) { $ci_offset = -1; if ($is_backup) { - $backup_field = (isset($true_selected) && $true_selected[$i] ? $true_selected[$i] : (isset($row) && isset($row['Field']) ? urlencode($row['Field']) : '')); + $backup_field = (isset($true_selected) && isset($true_selected[$i]) && $true_selected[$i] ? $true_selected[$i] : (isset($row) && isset($row['Field']) ? urlencode($row['Field']) : '')); $content_cells[$i][$ci] = "\n" . '' . "\n"; } else { $content_cells[$i][$ci] = ''; @@ -347,11 +347,15 @@ for ( $i = 0 ; $i <= $num_fields; $i++ ) { // here, we have a TIMESTAMP that SHOW FULL FIELDS reports as having the // NULL attribute, but SHOW CREATE TABLE says the contrary. Believe // the latter. - if (isset($row['Field']) && isset($analyzed_sql[0]) && $analyzed_sql[0]['create_table_fields'][$row['Field']]['type'] == 'TIMESTAMP' && $analyzed_sql[0]['create_table_fields'][$row['Field']]['timestamp_not_null'] == TRUE) { + if (isset($row['Field']) + && isset($analyzed_sql[0]) + && isset($analyzed_sql[0]['create_table_fields']) + && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['type']) + && $analyzed_sql[0]['create_table_fields'][$row['Field']]['type'] == 'TIMESTAMP' + && $analyzed_sql[0]['create_table_fields'][$row['Field']]['timestamp_not_null'] == true) { $row['Null'] = ''; } - // MySQL 4.1.2+ TIMESTAMP options // (if on_update_current_timestamp is set, then it's TRUE) if (isset($row['Field']) && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['on_update_current_timestamp'])) {