diff --git a/tbl_structure.php b/tbl_structure.php index 958b7d7caf..fad9c5c114 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -266,16 +266,17 @@ foreach ($fields as $row) { // MySQL 4.1.2+ TIMESTAMP options // (if on_update_current_timestamp is set, then it's TRUE) - if (isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['on_update_current_timestamp'])) { + $tempField = $analyzed_sql[0]['create_table_fields'][$row['Field']]; + if (isset($tempField['on_update_current_timestamp'])) { $attribute = 'on update CURRENT_TIMESTAMP'; } // here, we have a TIMESTAMP that SHOW FULL COLUMNS reports as having the // NULL attribute, but SHOW CREATE TABLE says the contrary. Believe // the latter. - if (! empty($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'] + if (! empty($tempField['type']) + && $tempField['type'] == 'TIMESTAMP' + && $tempField['timestamp_not_null'] ) { $row['Null'] = ''; }