Fix #15776 - privileges page return http 500
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
e543611426
commit
aa95fff919
@ -2681,8 +2681,8 @@ class Privileges
|
||||
public function mergePrivMapFromResult(array &$privMap, $result)
|
||||
{
|
||||
while ($row = $this->dbi->fetchAssoc($result)) {
|
||||
$user = $row['User'];
|
||||
$host = $row['Host'];
|
||||
$user = (string) $row['User'];
|
||||
$host = (string) $row['Host'];
|
||||
if (! isset($privMap[$user])) {
|
||||
$privMap[$user] = [];
|
||||
}
|
||||
@ -4497,10 +4497,10 @@ class Privileges
|
||||
$dbname_is_wildcard = null;
|
||||
|
||||
if (isset($_REQUEST['username'])) {
|
||||
$username = $_REQUEST['username'];
|
||||
$username = (string) $_REQUEST['username'];
|
||||
}
|
||||
if (isset($_REQUEST['hostname'])) {
|
||||
$hostname = $_REQUEST['hostname'];
|
||||
$hostname = (string) $_REQUEST['hostname'];
|
||||
}
|
||||
/**
|
||||
* Checks if a dropdown box has been used for selecting a database / table
|
||||
|
||||
@ -405,8 +405,8 @@ if (isset($_GET['export'])
|
||||
|| (isset($_POST['submit_mult']) && $_POST['submit_mult'] == 'export')
|
||||
) {
|
||||
list($title, $export) = $serverPrivileges->getListForExportUserDefinition(
|
||||
isset($username) ? $username : null,
|
||||
isset($hostname) ? $hostname : null
|
||||
isset($username) ? $username : '',
|
||||
isset($hostname) ? $hostname : ''
|
||||
);
|
||||
|
||||
unset($username, $hostname, $grants, $one_grant);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user