Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2017-08-22 09:31:19 +02:00
commit f2a4e30324
2 changed files with 8 additions and 5 deletions

View File

@ -57,7 +57,7 @@ after_success:
matrix:
fast_finish: true
include:
- php: "7.0"
- php: "7.2"
env: CI_MODE=selenium
- php: "7.0"
env: CI_MODE=release

View File

@ -186,10 +186,14 @@ class Validator
return true;
}
// static::testPHPErrorMsg();
$error = null;
$host = Core::sanitizeMySQLHost($host);
if (function_exists('error_clear_last')) {
/* PHP 7 only code */
error_clear_last();
}
if (DatabaseInterface::checkDbExtension('mysqli')) {
$socket = empty($socket) ? null : $socket;
$port = empty($port) ? null : $port;
@ -215,9 +219,8 @@ class Validator
mysqli_close($conn);
}
}
// static::testPHPErrorMsg(false);
if (isset($php_errormsg)) {
$error .= " - $php_errormsg";
if (! is_null($error)) {
$error .= ' - ' . error_get_last();
}
return is_null($error) ? true : array($error_key => $error);
}