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:
+1
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user