Merge pull request #725 from v-kaywon/fixOutputFloatTest2

Fix test so fetching float as integers doesn't work for PHP 7.0
This commit is contained in:
Yuki Wong 2018-03-19 13:18:50 -07:00 committed by GitHub
commit 3b685b67b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,8 +85,8 @@ function testOutputFloats($fetchNumeric, $inout)
// call stored procedure
$outSql = getCallProcSqlPlaceholders($spname, 2);
foreach ($pdoParamTypes as $pdoParamType) {
if ($pdoParamType == PDO::PARAM_INT && strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
// Bug 2876 in VSO: Linux - when retrieving a float as OUTPUT
if ($pdoParamType == PDO::PARAM_INT && (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN' || substr(PHP_VERSION, 0, 3) == "7.0")) {
// Bug 2876 in VSO: Linux or PHP 7.0 - when retrieving a float as OUTPUT
// or INOUT parameter with PDO::PARAM_INT, the returned values
// are always single digits, regardless of the original floats
continue;