[php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6
| From: | David Carlier | Date: | Fri, 27 Nov 2026 04:45:08 +0000 |
| Subject: | [php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-144243@lists.php.net to get a copy of this message | ||
Author: David Carlier (devnexen)
Date: 2026-11-27T04:41:23Z
Commit: https://github.com/php/php-src/commit/8c1314755a6cd83bd68a63190a7a4842543cff52
Raw diff: https://github.com/php/php-src/commit/8c1314755a6cd83bd68a63190a7a4842543cff52.diff
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
ext/pgsql: pg_get_notify() result is never === false with opcache enabled
# Conflicts:
# ext/pgsql/pgsql_arginfo.h
Changed paths:
A ext/pgsql/tests/gh25802.phpt
M Zend/Optimizer/zend_func_infos.h
M ext/pgsql/pgsql.stub.php
M ext/pgsql/pgsql_arginfo.h
Diff:
diff --git a/Zend/Optimizer/zend_func_infos.h b/Zend/Optimizer/zend_func_infos.h
index ecfd9fbbe6d5..5b714051394e 100644
--- a/Zend/Optimizer/zend_func_infos.h
+++ b/Zend/Optimizer/zend_func_infos.h
@@ -332,7 +332,7 @@ static const func_info_t func_infos[] = {
F1("pg_result_error_field", MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL),
F1("pg_get_result", MAY_BE_OBJECT|MAY_BE_FALSE),
F1("pg_result_status", MAY_BE_STRING|MAY_BE_LONG),
- F1("pg_get_notify",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING),
+ F1("pg_get_notify",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_FALSE),
F1("pg_socket", MAY_BE_RESOURCE|MAY_BE_FALSE),
F1("pg_meta_data",
MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
F1("pg_convert", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php
index b10455037717..91df189f8c4d 100644
--- a/ext/pgsql/pgsql.stub.php
+++ b/ext/pgsql/pgsql.stub.php
@@ -887,7 +887,7 @@ function pg_get_result(PgSql\Connection $connection): PgSql\Result|false {}
function pg_result_status(PgSql\Result $result, int $mode = PGSQL_STATUS_LONG): string|int {}
/**
- * @return array<int|string, int|string>
+ * @return array<int|string, int|string>|false
* @refcount 1
*/
function pg_get_notify(PgSql\Connection $connection, int $mode = PGSQL_ASSOC): array|false {}
diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h
index ae6d3db5ebb5..d3c5c1f23ef3 100644
--- a/ext/pgsql/pgsql_arginfo.h
+++ b/ext/pgsql/pgsql_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit pgsql.stub.php instead.
- * Stub hash: a9b191d12693f913c9573da7354398bf36e9e019 */
+ * Stub hash: 705405a676902b4a34a0cce4a4e2993a01413a2e */
#include "zend_attributes.h"
#include "zend_constants.h"
diff --git a/ext/pgsql/tests/gh25802.phpt b/ext/pgsql/tests/gh25802.phpt
new file mode 100644
index 000000000000..2a1fa2711e08
--- /dev/null
+++ b/ext/pgsql/tests/gh25802.phpt
@@ -0,0 +1,29 @@
+--TEST--
+GH-25802: pg_get_notify() result is never === false with opcache enabled
+--EXTENSIONS--
+pgsql
+opcache
+--SKIPIF--
+<?php include("inc/skipif.inc"); ?>
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.file_update_protection=0
+--FILE--
+<?php
+include('inc/config.inc');
+
+function check(PgSql\Connection $db): void {
+ $msg = pg_get_notify($db);
+ var_dump($msg === false);
+}
+
+$db = pg_connect($conn_str);
+check($db);
+pg_query($db, 'LISTEN pg_get_notify_false');
+pg_query($db, 'NOTIFY pg_get_notify_false');
+check($db);
+?>
+--EXPECT--
+bool(true)
+bool(false)