postgres error message include \n characters
| Bug #25963 | postgres error message include \n characters | ||||
|---|---|---|---|---|---|
| Submitted: | 2003-10-23 05:50 UTC | Modified: | 2003-11-25 17:21 UTC | ||
| From: | edechaux at irci dot fr | Assigned: | helly (profile) | ||
| Status: | Closed | Package: | PostgreSQL related | ||
| PHP Version: | 4.3.3 | OS: | * | ||
| Private report: | No | CVE-ID: | None | ||
[2003-10-23 05:50 UTC] edechaux at irci dot fr
Description: ------------ When a connection to a Postgres database fails, the error message which is in the $php_errormsg variable ends with the following string : '\n\n.' The final '.' is quite anoying because you just can't 'trim' the $php_errormsg, you must 'trim ($php_errormsg, "\n.")' to remove the dot and the newline characters. Could it be possible to remove the final dot, or even the final '\n\n.' string ? Thanks.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2003-10-24 09:35 UTC] edechaux at irci dot fr
I tried with the lastest CVS and there is no changes. Here is a sample code : ----file toto.php---- <? if (! pg_connect ('blablabla')) { echo '{' . $php_errormsg . '}'; } ?> -------- I execute 'php toto.php'. It displays : {Unable to connect to PostgreSQL server: missing "=" after "blablabla" in connection info string .} As you can see there is a newline character between 'string' and '.'. This newline character mess up the html code if you d'ont remove it... It still works, but it break your html code format :p[2003-10-25 08:48 UTC] helly@php.net
[2003-11-25 17:21 UTC] iliaa@php.net