diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-10 16:52:17 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-10 16:53:08 +0100 |
| commit | 9e3ba775b7de7d7647c488beb9e302d03690f955 (patch) | |
| tree | 511c1b86b2c6e1e5875be73c085c4a94d714aa43 /ext/pdo_pgsql | |
| parent | a5527577e7e80dbaf4e0313c1bfc890b2cc5f3b7 (diff) | |
| download | php-git-9e3ba775b7de7d7647c488beb9e302d03690f955.tar.gz | |
Fixed bug #72368
Generate a param count mismatch error even if the query contains
no placeholders.
Additionally we shouldn't HANDLE errors from pdo_parse_params,
which are always reported via raise_impl_error. Doing so results
in duplicate error messages.
Diffstat (limited to 'ext/pdo_pgsql')
| -rw-r--r-- | ext/pdo_pgsql/tests/bug70313.phpt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/pdo_pgsql/tests/bug70313.phpt b/ext/pdo_pgsql/tests/bug70313.phpt index 07c7f68ab3..e6f9e4593e 100644 --- a/ext/pdo_pgsql/tests/bug70313.phpt +++ b/ext/pdo_pgsql/tests/bug70313.phpt @@ -19,7 +19,7 @@ try { $stmt->execute([1]); } catch (PDOException $e) { - var_dump($e->getCode()); + echo $e->getMessage(), "\n"; } $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); @@ -28,10 +28,10 @@ try { $stmt->execute([1]); } catch (PDOException $e) { - var_dump($e->getCode()); + echo $e->getMessage(), "\n"; } ?> ---EXPECT-- -string(5) "42601" -string(5) "42601" +--EXPECTF-- +SQLSTATE[42601]: Syntax error: %A +SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens |
