Skip to content

Commit 86b7d04

Browse files
committed
pgsql_insert fix unit tests
1 parent 90a39fd commit 86b7d04

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ PHP 8.3 UPGRADE NOTES
100100
- PGSQL:
101101
. pg_fetch_object now raises a ValueError instead of an Exception when the constructor_args
102102
argument is non empty with the class not having constructor.
103+
. pg_insert now raises a ValueError instead of a WARNING when the table specified is invalid.
103104

104105
- Standard:
105106
. E_NOTICEs emitted by unserialized() have been promoted to E_WARNING.

ext/pgsql/pgsql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4138,7 +4138,7 @@ PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string
41384138
tmp_name = php_strtok_r(src, ".", &tmp_name2);
41394139
if (!tmp_name) {
41404140
efree(src);
4141-
zend_argument_value_error(2, "The table name must be specified (%s)", ZSTR_VAL(table_name));
4141+
zend_argument_value_error(2, "must be specified (%s)", ZSTR_VAL(table_name));
41424142
return FAILURE;
41434143
}
41444144
if (!tmp_name2 || !*tmp_name2) {

ext/pgsql/tests/pg_insert_002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ Done
2323
--EXPECTF--
2424
pg_insert(): Argument #2 ($table_name) cannot be empty
2525

26-
pg_insert(): The table name must be specified (.)
27-
pg_insert(): The table name must be specified (..)
26+
pg_insert(): Argument #2 ($table_name) must be specified (.)
27+
pg_insert(): Argument #2 ($table_name) must be specified (..)
2828
Done

0 commit comments

Comments
 (0)