ID:               25935
 Updated by:       [EMAIL PROTECTED]
 Reported By:      edechaux at irci dot fr
-Status:           Open
+Status:           Bogus
 Bug Type:         PostgreSQL related
 Operating System: Linux 2.4.21
 PHP Version:      4.3.3
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Your code is wrong, use ===, see below why:

[EMAIL PROTECTED] /usr/src/php5 $ php -r
'var_dump(pg_connection_status(false));'
bool(false)
[EMAIL PROTECTED] /usr/src/php5 $ php -r 'var_dump(PGSQL_CONNECTION_OK);'
int(0)


Previous Comments:
------------------------------------------------------------------------

[2003-10-21 10:58:04] edechaux at irci dot fr

Description:
------------
I have notice a strange beaviour with the pg_connection_status
function.

See this code :


Reproduce code:
---------------


echo pg_connection_status (false) == PGSQL_CONNECTION_OK ? 'strange' :
'ok';

Expected result:
----------------

I think I should see 'ok' on the screen. false is not a valid Postgres
connection.

Actual result:
--------------

However 'strange' is written on the screen.

It may not be a bug. But this behaviour should be written in the doc.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=25935&edit=1

Reply via email to