Fix error reporting on invalid request data

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-06-17 09:21:52 +02:00
parent 8451a7a5d2
commit e1eb5e8e89

View File

@ -26,7 +26,10 @@ if (!($values instanceof stdClass)) {
$values = (array)$values;
$result = PMA_config_validate($vids, $values, true);
if ($result === false) {
$result = 'Wrong data or no validation for ' . $vids;
$result = sprintf(
__('Wrong data or no validation for %s'),
implode(',', $vids)
);
}
echo $result !== true ? json_encode($result) : '';
?>