Fix for a problem breaking the mysqldump detection (when it fails on windows). Root cause: do not return/display the output of the shell command used to test mysqldump since (on windows) it may contain non-UTF-8 characters of an unknown character set and this breaks "UTF-8 picky" functions like json_encode.

SVN:trunk[5284]
This commit is contained in:
Denis Flaven
2018-01-17 16:29:44 +00:00
parent e74b2e32c9
commit dc0e739667

View File

@@ -457,15 +457,17 @@ class SetupUtils
exec($sCommand, $aOutput, $iRetCode);
if ($iRetCode == 0)
{
$aResult[] = new CheckResult(CheckResult::INFO, "mysqldump is present: ".$aOutput[0]);
$aResult[] = new CheckResult(CheckResult::INFO, "mysqldump is present: Ok.");
}
elseif ($iRetCode == 1)
{
$aResult[] = new CheckResult(CheckResult::ERROR, "mysqldump could not be found: ".implode(' ', $aOutput)." - Please make sure it is installed and in the path.");
// Unfortunately $aOutput is not really usable since we don't know its encoding (character set)
$aResult[] = new CheckResult(CheckResult::ERROR, "mysqldump could not be found. Please make sure it is installed and in the path.");
}
else
{
$aResult[] = new CheckResult(CheckResult::ERROR, "mysqldump could not be executed (retcode=$iRetCode): Please make sure it is installed and in the path");
// Unfortunately $aOutput is not really usable since we don't know its encoding (character set)
$aResult[] = new CheckResult(CheckResult::ERROR, "mysqldump could not be executed (retcode=$iRetCode): Please make sure it is installed and in the path");
}
foreach($aOutput as $sLine)
{