[task/mssql-db-tests] Remove MS SQL helper values from SELECT LIMIT results.

PHPBB3-9868
This commit is contained in:
Nils Adermann 2010-10-25 19:22:57 +02:00
parent fa8dca2400
commit 76e8a9466e

View file

@ -413,13 +413,18 @@ class dbal_mssqlnative extends dbal
$row = @sqlsrv_fetch_array($query_id, SQLSRV_FETCH_ASSOC); $row = @sqlsrv_fetch_array($query_id, SQLSRV_FETCH_ASSOC);
// I hope i am able to remove this later... hopefully only a PHP or MSSQL bug
if ($row) if ($row)
{ {
foreach ($row as $key => $value) foreach ($row as $key => $value)
{ {
$row[$key] = ($value === ' ' || $value === NULL) ? '' : $value; $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value;
} }
// remove helper values from LIMIT queries
if (isset($row['line2']))
{
unset($row['line2'], $row['line3']);
}
} }
return $row; return $row;
} }