From 5c9c404870e05e9da2bd3b3123e4cf1699dfe7fc Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 16 Jun 2026 16:27:53 -0400 Subject: [PATCH] Remove stray printf() on invalid DSN version in pdo_dblib When the connection string specified an unrecognized TDS version, pdo_dblib_handle_factory() wrote the message to stdout via printf() before raising the proper PDO error, corrupting SAPI output. The pdo_raise_impl_error() call right below already reports the condition; drop the printf(). Closes GH-22345 --- ext/pdo_dblib/dblib_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 0055dcb03b3c..00ecf2d232cd 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -539,7 +539,6 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options) } if (i==nvers) { - printf("Invalid version '%s'\n", vars[5].optval); pdo_raise_impl_error(dbh, NULL, "HY000", "PDO_DBLIB: Invalid version specified in connection string."); goto cleanup; /* unknown version specified */ }