DatabaseInterface->getDefinition() can return false
Related to https://github.com/phpmyadmin/website/issues/81 Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
parent
539724df1d
commit
399f25a52e
@ -353,10 +353,12 @@ class Operations
|
||||
$tmp_query = $GLOBALS['dbi']->getDefinition(
|
||||
$db, 'PROCEDURE', $procedure_name
|
||||
);
|
||||
// collect for later display
|
||||
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
|
||||
$GLOBALS['dbi']->selectDb($_REQUEST['newname']);
|
||||
$GLOBALS['dbi']->query($tmp_query);
|
||||
if ($tmp_query !== false) {
|
||||
// collect for later display
|
||||
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
|
||||
$GLOBALS['dbi']->selectDb($_REQUEST['newname']);
|
||||
$GLOBALS['dbi']->query($tmp_query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -367,10 +369,12 @@ class Operations
|
||||
$tmp_query = $GLOBALS['dbi']->getDefinition(
|
||||
$db, 'FUNCTION', $function_name
|
||||
);
|
||||
// collect for later display
|
||||
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
|
||||
$GLOBALS['dbi']->selectDb($_REQUEST['newname']);
|
||||
$GLOBALS['dbi']->query($tmp_query);
|
||||
if ($tmp_query !== false) {
|
||||
// collect for later display
|
||||
$GLOBALS['sql_query'] .= "\n" . $tmp_query;
|
||||
$GLOBALS['dbi']->selectDb($_REQUEST['newname']);
|
||||
$GLOBALS['dbi']->query($tmp_query);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user