pgsql_insert fix unit tests (#10860)

This commit is contained in:
David CARLIER 2023-03-15 22:57:25 +00:00 committed by GitHub
parent 5ef46020b6
commit feb82d91b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -100,6 +100,7 @@ PHP 8.3 UPGRADE NOTES
- PGSQL:
. pg_fetch_object now raises a ValueError instead of an Exception when the constructor_args
argument is non empty with the class not having constructor.
. pg_insert now raises a ValueError instead of a WARNING when the table specified is invalid.
- Standard:
. E_NOTICEs emitted by unserialized() have been promoted to E_WARNING.

View file

@ -4138,7 +4138,7 @@ PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string
tmp_name = php_strtok_r(src, ".", &tmp_name2);
if (!tmp_name) {
efree(src);
zend_argument_value_error(2, "The table name must be specified (%s)", ZSTR_VAL(table_name));
zend_argument_value_error(2, "must be specified (%s)", ZSTR_VAL(table_name));
return FAILURE;
}
if (!tmp_name2 || !*tmp_name2) {

View file

@ -22,7 +22,6 @@ foreach (array('', '.', '..') as $table) {
Done
--EXPECTF--
pg_insert(): Argument #2 ($table_name) cannot be empty
pg_insert(): The table name must be specified (.)
pg_insert(): The table name must be specified (..)
pg_insert(): Argument #2 ($table_name) must be specified (.)
pg_insert(): Argument #2 ($table_name) must be specified (..)
Done