From 76e8a9466ef3227337dd18faf9b623195af00364 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 25 Oct 2010 19:22:57 +0200 Subject: [PATCH] [task/mssql-db-tests] Remove MS SQL helper values from SELECT LIMIT results. PHPBB3-9868 --- phpBB/includes/db/mssqlnative.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php index 93a8f91613..1e0a8077e7 100644 --- a/phpBB/includes/db/mssqlnative.php +++ b/phpBB/includes/db/mssqlnative.php @@ -413,13 +413,18 @@ class dbal_mssqlnative extends dbal $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) { foreach ($row as $key => $value) { $row[$key] = ($value === ' ' || $value === NULL) ? '' : $value; } + + // remove helper values from LIMIT queries + if (isset($row['line2'])) + { + unset($row['line2'], $row['line3']); + } } return $row; }