From 2e37de57ca68740d2ee25fd6340ecfe88b63d995 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 26 Aug 2014 07:54:38 -0400 Subject: [PATCH] Fix undefined variable notice; fix parameter type Signed-off-by: Marc Delisle --- libraries/tbl_relation.lib.php | 16 ++++++++-------- tbl_relation.php | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libraries/tbl_relation.lib.php b/libraries/tbl_relation.lib.php index 60b020ed47..bc9bfe9243 100644 --- a/libraries/tbl_relation.lib.php +++ b/libraries/tbl_relation.lib.php @@ -159,14 +159,14 @@ function PMA_generateRelationalDropdown( /** * Function to get html for the common form * - * @param string $db current database - * @param string $table current table - * @param array $columns columns - * @param array $cfgRelation configuration relation - * @param string $tbl_storage_engine table storage engine - * @param array $existrel db, table, column - * @param array $existrel_foreign db, table, column - * @param array $options_array options array + * @param string $db current database + * @param string $table current table + * @param array $columns columns + * @param array $cfgRelation configuration relation + * @param string $tbl_storage_engine table storage engine + * @param array|null $existrel db, table, column + * @param array|null $existrel_foreign db, table, column + * @param array $options_array options array * * @return string */ diff --git a/tbl_relation.php b/tbl_relation.php index 9be5f6260c..e8af9d5407 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -148,7 +148,8 @@ $columns = $GLOBALS['dbi']->getColumns($db, $table); // common form $html_output .= PMA_getHtmlForCommonForm( - $db, $table, $columns, $cfgRelation, $tbl_storage_engine, $existrel, + $db, $table, $columns, $cfgRelation, $tbl_storage_engine, + isset($existrel) ? $existrel : null, isset($existrel_foreign) ? $existrel_foreign : null, $options_array );