diff --git a/libraries/classes/Server/Privileges.php b/libraries/classes/Server/Privileges.php index a61051ab0f..152de635bb 100644 --- a/libraries/classes/Server/Privileges.php +++ b/libraries/classes/Server/Privileges.php @@ -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 diff --git a/server_privileges.php b/server_privileges.php index bfa1313fd0..692a9f78d3 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -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);