bug #1458334, undefined offset

This commit is contained in:
Marc Delisle
2006-03-26 11:13:03 +00:00
parent ae52834be5
commit 40f47178e3
2 changed files with 8 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ $Source$
2006-03-26 Marc Delisle <lem9@users.sourceforge.net>
* sql.php: bug #1448890 Column expander doesn't work
* libraries/tbl_properties.inc.php: bug #1458334, undefined offset
2006-03-25 Marc Delisle <lem9@users.sourceforge.net>
* db_operations.php, libraries/Table.class.php,

View File

@@ -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" . '<input type="hidden" name="field_orig[]" value="' . $backup_field . '" />' . "\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'])) {