Skip to content

Commit ab161e7

Browse files
committed
Fix the array key type of pg_fetch_row and pg_fetch_array
1 parent 1bd624e commit ab161e7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Zend/Optimizer/zend_func_infos.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ static const func_info_t func_infos[] = {
156156
F1("pg_field_name", MAY_BE_STRING),
157157
F1("pg_field_type_oid", MAY_BE_STRING|MAY_BE_LONG),
158158
F1("pg_fetch_result", MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL),
159-
F1("pg_fetch_row", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
159+
F1("pg_fetch_row", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
160160
F1("pg_fetch_assoc", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
161-
F1("pg_fetch_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
161+
F1("pg_fetch_array", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL|MAY_BE_FALSE),
162162
F1("pg_fetch_object", MAY_BE_OBJECT|MAY_BE_FALSE),
163163
F1("pg_fetch_all", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_ARRAY),
164164
F1("pg_fetch_all_columns", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_NULL),

ext/pgsql/pgsql.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function pg_fetch_result(PgSql\Result $result, $row, string|int $field = UNKNOWN
187187
function pg_result(PgSql\Result $result, $row, string|int $field = UNKNOWN): string|false|null {}
188188

189189
/**
190-
* @return array<int, string|null>|false
190+
* @return array<int|string, string|null>|false
191191
* @refcount 1
192192
*/
193193
function pg_fetch_row(PgSql\Result $result, ?int $row = null, int $mode = PGSQL_NUM): array|false {}
@@ -199,7 +199,7 @@ function pg_fetch_row(PgSql\Result $result, ?int $row = null, int $mode = PGSQL_
199199
function pg_fetch_assoc(PgSql\Result $result, ?int $row = null): array|false {}
200200

201201
/**
202-
* @return array<int, string|null>|false
202+
* @return array<int|string, string|null>|false
203203
* @refcount 1
204204
*/
205205
function pg_fetch_array(PgSql\Result $result, ?int $row = null, int $mode = PGSQL_BOTH): array|false {}

ext/pgsql/pgsql_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 94b45c6e74b9061277112f75d186dfa45eb9d8b8 */
2+
* Stub hash: fef54d6edd292e005e1db070c5347a8177bc804a */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0)

0 commit comments

Comments
 (0)