From f388a41b04db81387a8062fd17058056107ee299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Thu, 2 Nov 2017 11:37:33 -0200 Subject: [PATCH] Fix undefined index notices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- libraries/tbl_columns_definition_form.inc.php | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/libraries/tbl_columns_definition_form.inc.php b/libraries/tbl_columns_definition_form.inc.php index 5fb89793cb..e7bf4375c9 100644 --- a/libraries/tbl_columns_definition_form.inc.php +++ b/libraries/tbl_columns_definition_form.inc.php @@ -401,24 +401,26 @@ $html = Template::get('columns_definitions/column_definitions_form')->render([ 'form_params' => $form_params, 'content_cells' => $content_cells, 'partition_details' => $partitionDetails, - 'primary_indexes' => $_REQUEST['primary_indexes'], - 'unique_indexes' => $_REQUEST['unique_indexes'], - 'indexes' => $_REQUEST['indexes'], - 'fulltext_indexes' => $_REQUEST['fulltext_indexes'], - 'spatial_indexes' => $_REQUEST['spatial_indexes'], - 'table' => $_REQUEST['table'], - 'comment' => $_REQUEST['comment'], - 'tbl_collation' => $_REQUEST['tbl_collation'], - 'tbl_storage_engine' => $_REQUEST['tbl_storage_engine'], - 'connection' => $_REQUEST['connection'], - 'change_column' => $_REQUEST['change_column'], + 'primary_indexes' => isset($_REQUEST['primary_indexes']) ? $_REQUEST['primary_indexes'] : null, + 'unique_indexes' => isset($_REQUEST['unique_indexes']) ? $_REQUEST['unique_indexes'] : null, + 'indexes' => isset($_REQUEST['indexes']) ? $_REQUEST['indexes'] : null, + 'fulltext_indexes' => isset($_REQUEST['fulltext_indexes']) ? $_REQUEST['fulltext_indexes'] : null, + 'spatial_indexes' => isset($_REQUEST['spatial_indexes']) ? $_REQUEST['spatial_indexes'] : null, + 'table' => isset($_REQUEST['table']) ? $_REQUEST['table'] : null, + 'comment' => isset($_REQUEST['comment']) ? $_REQUEST['comment'] : null, + 'tbl_collation' => isset($_REQUEST['tbl_collation']) ? $_REQUEST['tbl_collation'] : null, + 'tbl_storage_engine' => isset($_REQUEST['tbl_storage_engine']) ? $_REQUEST['tbl_storage_engine'] : null, + 'connection' => isset($_REQUEST['connection']) ? $_REQUEST['connection'] : null, + 'change_column' => isset($_REQUEST['change_column']) ? $_REQUEST['change_column'] : null, 'is_virtual_columns_supported' => Util::isVirtualColumnsSupported(), - 'browse_mime' => $GLOBALS['cfg']['BrowseMIME'], + 'browse_mime' => isset($GLOBALS['cfg']['BrowseMIME']) ? $GLOBALS['cfg']['BrowseMIME'] : null, 'server_type' => Util::getServerType(), 'max_rows' => intval($GLOBALS['cfg']['MaxRows']), - 'char_editing' => $GLOBALS['cfg']['CharEditing'], + 'char_editing' => isset($GLOBALS['cfg']['CharEditing']) ? $GLOBALS['cfg']['CharEditing'] : null, 'attribute_types' => $GLOBALS['dbi']->types->getAttributes(), - 'privs_available' => $GLOBALS['col_priv'] && $GLOBALS['is_reload_priv'], + 'privs_available' => (isset($GLOBALS['col_priv']) ? $GLOBALS['col_priv'] : false + && isset($GLOBALS['is_reload_priv']) ? $GLOBALS['is_reload_priv'] : false + ), 'max_length' => $GLOBALS['dbi']->getVersion() >= 50503 ? 1024 : 255, 'have_partitioning' => Partition::havePartitioning(), ]);