From 35d98cb6cecbe7b2f0f2f3721abba245c26e370d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Sun, 8 Mar 2026 04:59:58 +0000 Subject: [PATCH] ext/pgsql: Fix preprocessor guard typo that silently disabled a feature Fix `PQTRACE_SUPPRESS_TIMESTAMPS` guard misspelling in pgsql.stub.php. The guard has been misspelled as `PQTRACE_SUPPPRESS_TIMESTAMPS` (three P's) since 7ec8ae12c4b, preventing the `PGSQL_TRACE_SUPPRESS_TIMESTAMPS` constant from being registered. close GH-21386 --- NEWS | 4 ++++ ext/pgsql/pgsql.stub.php | 2 +- ext/pgsql/pgsql_arginfo.h | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index abe3cc9efb872..9f2b1ed85e205 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ PHP NEWS . Fixed re-entrancy issue on php_pcre_match_impl, php_pcre_replace_impl, php_pcre_split_impl, and php_pcre_grep_impl. (David Carlier) +- PGSQL: + . Fixed preprocessor silently guarding PGSQL_SUPPRESS_TIMESTAMPS support + due to a typo. (KentarouTakeda) + - Session: . Fix memory leak due to multiple exception happening during session abort. (arshidkv12) diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index ec7e2614ce0a3..2f51bdfca6b29 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -432,7 +432,7 @@ * @cvalue PGSQL_DML_STRING */ const PGSQL_DML_STRING = UNKNOWN; -#ifdef PQTRACE_SUPPPRESS_TIMESTAMPS +#ifdef PQTRACE_SUPPRESS_TIMESTAMPS /** * @var int * @cvalue PQTRACE_SUPPRESS_TIMESTAMPS diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index ab38b6a7a8bfa..9d8f636900064 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 14b0bdd019480b850940b2c2b012b5f6d51746b8 */ + * Stub hash: c7e052b85d35ac885704016224e488c67cb83df3 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -828,7 +828,7 @@ static void register_pgsql_symbols(int module_number) REGISTER_LONG_CONSTANT("PGSQL_DML_EXEC", PGSQL_DML_EXEC, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PGSQL_DML_ASYNC", PGSQL_DML_ASYNC, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PGSQL_DML_STRING", PGSQL_DML_STRING, CONST_PERSISTENT); -#if defined(PQTRACE_SUPPPRESS_TIMESTAMPS) +#if defined(PQTRACE_SUPPRESS_TIMESTAMPS) REGISTER_LONG_CONSTANT("PGSQL_TRACE_SUPPRESS_TIMESTAMPS", PQTRACE_SUPPRESS_TIMESTAMPS, CONST_PERSISTENT); #endif #if defined(PQTRACE_REGRESS_MODE)