mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Allow drivers to omit error code
And thus generate error messages that match what PDO emulation would generate. This fixes the error message regression from the previous commit.
This commit is contained in:
parent
15b51a215a
commit
a5527577e7
6 changed files with 14 additions and 9 deletions
|
@ -282,8 +282,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
|
|||
ZEND_ATOL(param->paramno, namevar + 1);
|
||||
param->paramno--;
|
||||
} else {
|
||||
pdo_pgsql_error_stmt_msg(
|
||||
stmt, PGRES_FATAL_ERROR, "HY093", ZSTR_VAL(param->name));
|
||||
pdo_pgsql_error_stmt_msg(stmt, 0, "HY093", ZSTR_VAL(param->name));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -295,8 +294,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
|
|||
return 1;
|
||||
}
|
||||
if (!zend_hash_index_exists(stmt->bound_param_map, param->paramno)) {
|
||||
pdo_pgsql_error_stmt_msg(
|
||||
stmt, PGRES_FATAL_ERROR, "HY093", "parameter was not defined");
|
||||
pdo_pgsql_error_stmt_msg(stmt, 0, "HY093", "parameter was not defined");
|
||||
return 0;
|
||||
}
|
||||
case PDO_PARAM_EVT_EXEC_POST:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue