1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00

php_pgsql_meta_data raises a ValueError when table name is invalid.

This commit is contained in:
David Carlier
2023-03-13 20:16:33 +00:00
parent 0ce755be26
commit 394470c052
2 changed files with 3 additions and 7 deletions
+1 -2
View File
@@ -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) {