From c648cafa299f1c69e23df8e7050e90b8af351e70 Mon Sep 17 00:00:00 2001 From: Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com> Date: Thu, 10 Aug 2023 02:23:58 +0900 Subject: [PATCH] Fixed error when using PDO::ATTR_STRINGIFY_FETCHES (#1468) * fix accept PDO_ATTR_STRINGIFY_FETCHES to set_attr on after 8.1.22 and after 8.2.9 php version * try to put it back * fix accept PDO_ATTR_STRINGIFY_FETCHES to set_attr on after 8.1.22 and after 8.2.9 php version --- source/pdo_sqlsrv/pdo_dbh.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/pdo_sqlsrv/pdo_dbh.cpp b/source/pdo_sqlsrv/pdo_dbh.cpp index 8991c7f82..4cac40b46 100644 --- a/source/pdo_sqlsrv/pdo_dbh.cpp +++ b/source/pdo_sqlsrv/pdo_dbh.cpp @@ -1323,6 +1323,14 @@ bool pdo_sqlsrv_dbh_set_attr(_Inout_ pdo_dbh_t *dbh, _In_ zend_long attr, _Inout break; #endif +#if (PHP_VERSION_ID >= 80122 && PHP_VERSION_ID < 80200) || PHP_VERSION_ID >= 80209 + case PDO_ATTR_STRINGIFY_FETCHES: + { + // do nothing + } + break; +#endif + // Not supported case PDO_ATTR_FETCH_TABLE_NAMES: case PDO_ATTR_FETCH_CATALOG_NAMES: