mirror of
https://github.com/php/php-src.git
synced 2024-11-25 10:54:15 +08:00
Fixed bug #43457 (Prepared statement with incorrect parms doens't
throw exception with pdo_pgsql driver)
This commit is contained in:
parent
fd73296bf2
commit
39f37ce950
@ -238,7 +238,7 @@ static int pgsql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *
|
||||
param->name, param->namelen + 1, (void**)&nameptr)) {
|
||||
param->paramno = atoi(nameptr + 1) - 1;
|
||||
} else {
|
||||
pdo_pgsql_error_stmt(stmt, PGRES_FATAL_ERROR, "HY093");
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY093", param->name TSRMLS_CC);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -19,5 +19,6 @@ var_dump($stmt->bindValue(':test', 1, PDO::PARAM_INT));
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Warning: PDOStatement::bindValue(): SQLSTATE[HY093]: Invalid parameter number: :test in %s/bug36727.php on line %d
|
||||
bool(false)
|
||||
Done
|
Loading…
Reference in New Issue
Block a user