From 98df129296c83ebe51e7c484c7d57ee31f19e115 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 5 Feb 2011 15:58:04 -0500 Subject: [PATCH] Avoid notices for undefined indexes --- tbl_change.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tbl_change.php b/tbl_change.php index 2d4bcd8ad..d77ae864d 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -377,6 +377,8 @@ foreach ($rows as $row_id => $vrow) { if (stripos($table_fields[$i]['Type'], 'binary') === 0 || stripos($table_fields[$i]['Type'], 'varbinary') === 0) { $table_fields[$i]['is_binary'] = stristr($table_fields[$i]['Type'], 'binary'); + } else { + $table_fields[$i]['is_binary'] = false; } // If check to ensure types such as "enum('one','two','blob',..)" or @@ -386,6 +388,8 @@ foreach ($rows as $row_id => $vrow) { || stripos($table_fields[$i]['Type'], 'mediumblob') === 0 || stripos($table_fields[$i]['Type'], 'longblob') === 0) { $table_fields[$i]['is_blob'] = stristr($table_fields[$i]['Type'], 'blob'); + } else { + $table_fields[$i]['is_blob'] = false; } // If check to ensure types such as "enum('one','two','char',..)" or @@ -393,6 +397,8 @@ foreach ($rows as $row_id => $vrow) { if (stripos($table_fields[$i]['Type'], 'char') === 0 || stripos($table_fields[$i]['Type'], 'varchar') === 0) { $table_fields[$i]['is_char'] = stristr($table_fields[$i]['Type'], 'char'); + } else { + $table_fields[$i]['is_char'] = false; } $table_fields[$i]['first_timestamp'] = false;