mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
php_pgsql_meta_data raises a ValueError when table name is invalid.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user