Fix #15776 - privileges page return http 500

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-01-12 22:18:37 +01:00
parent e543611426
commit aa95fff919
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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);