Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit feb82d9

Browse files
pgsql_insert fix unit tests (#10860)
1 parent 5ef4602 commit feb82d9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ foreach (array('', '.', '..') as $table) {
2222
Done
2323
--EXPECTF--
2424
pg_insert(): Argument #2 ($table_name) cannot be empty
25-
26-
pg_insert(): The table name must be specified (.)
27-
pg_insert(): The table name must be specified (..)
25+
pg_insert(): Argument #2 ($table_name) must be specified (.)
26+
pg_insert(): Argument #2 ($table_name) must be specified (..)
2827
Done

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /