From 54f03d31e07450defb230367a65d58cd42e80b1d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 21 Sep 2020 16:11:50 +0200 Subject: Promote invalid field to ValueError in pgsql The same error condition is a ValueError in mysqli, be consistent. Additionally, do not display the argument name for these errors. As the signatures are overloaded, the argument name may not match the meaning at all. --- ext/pgsql/pgsql.stub.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ext/pgsql/pgsql.stub.php') diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index 181d62c9cd..4e2b21e4f2 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -118,37 +118,37 @@ function pg_last_notice($connection, int $option = PGSQL_NOTICE_LAST): array|str function pg_field_table($result, int $field_number, bool $oid_only = false): string|int|false {} /** @param resource $result */ -function pg_field_name($result, int $field_number): string|false {} +function pg_field_name($result, int $field_number): string {} /** * @param resource $result * @alias pg_field_name * @deprecated */ -function pg_fieldname($result, int $field_number): string|false {} +function pg_fieldname($result, int $field_number): string {} /** @param resource $result */ -function pg_field_size($result, int $field_number): int|false {} +function pg_field_size($result, int $field_number): int {} /** * @param resource $result * @alias pg_field_size * @deprecated */ -function pg_fieldsize($result, int $field_number): int|false {} +function pg_fieldsize($result, int $field_number): int {} /** @param resource $result */ -function pg_field_type($result, int $field_number): string|false {} +function pg_field_type($result, int $field_number): string {} /** * @param resource $result * @alias pg_field_type * @deprecated */ -function pg_fieldtype($result, int $field_number): string|false {} +function pg_fieldtype($result, int $field_number): string {} /** @param resource $result */ -function pg_field_type_oid($result, int $field_number): string|int|false {} +function pg_field_type_oid($result, int $field_number): string|int {} /** @param resource $result */ function pg_field_num($result, string $field_name): int {} @@ -196,7 +196,7 @@ function pg_fetch_object($result, ?int $row_number = null, string $class_name = function pg_fetch_all($result, int $result_type = PGSQL_ASSOC): array|false {} /** @param resource $result */ -function pg_fetch_all_columns($result, int $column_number = 0): array|false {} +function pg_fetch_all_columns($result, int $field_number = 0): array {} /** @param resource $result */ function pg_result_seek($result, int $row_number): bool {} -- cgit v1.2.1