diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index a2d6da12209..944f0d14fae 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4137,9 +4137,8 @@ PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string src = estrdup(ZSTR_VAL(table_name)); tmp_name = php_strtok_r(src, ".", &tmp_name2); if (!tmp_name) { - // TODO ValueError (empty table name)? efree(src); - php_error_docref(NULL, E_WARNING, "The table name must be specified"); + zend_argument_value_error(2, "The table name must be specified (%s)", ZSTR_VAL(table_name)); return FAILURE; } if (!tmp_name2 || !*tmp_name2) { diff --git a/ext/pgsql/tests/pg_insert_002.phpt b/ext/pgsql/tests/pg_insert_002.phpt index e3e593999f6..11e9b32d2ed 100644 --- a/ext/pgsql/tests/pg_insert_002.phpt +++ b/ext/pgsql/tests/pg_insert_002.phpt @@ -23,9 +23,6 @@ Done --EXPECTF-- pg_insert(): Argument #2 ($table_name) cannot be empty -Warning: pg_insert(): The table name must be specified in %s on line %d -bool(false) - -Warning: pg_insert(): The table name must be specified in %s on line %d -bool(false) +pg_insert(): The table name must be specified (.) +pg_insert(): The table name must be specified (..) Done