|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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