summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.stub.php
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-09-21 16:11:50 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-09-21 17:00:23 +0200
commit54f03d31e07450defb230367a65d58cd42e80b1d (patch)
tree8aa21bfaf263353cf151b84be792a1ea161f8b8f /ext/pgsql/pgsql.stub.php
parent68a907569c0d0406ad6e11017ccbe98ecc1f1405 (diff)
downloadphp-git-54f03d31e07450defb230367a65d58cd42e80b1d.tar.gz
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.
Diffstat (limited to 'ext/pgsql/pgsql.stub.php')
-rw-r--r--ext/pgsql/pgsql.stub.php16
1 files changed, 8 insertions, 8 deletions
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 {}