Bug #54607 [NEW]: Warning on pg_connection_status()

From: Date: Tue, 26 Apr 2011 13:30:14 +0000
Subject: Bug #54607 [NEW]: Warning on pg_connection_status()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-160380@lists.php.net to get a copy of this message
From:             
Operating system: Ubuntu 8.04
PHP version:      5.3.6
Package:          PostgreSQL related
Bug Type:         Bug
Bug description:Warning on pg_connection_status()

Description:
------------
In order to verify my connection to PostgreSql, I use
PG_CONNECTION_STATUS(). When I try to check my connection, I have a warning
who said : "pg_connection_status(): 103 is not a valid PostgreSQL link
resource".
PG_CONNECTION_STATUS() should return just PGSQL_CONNECTION_BAD if the
connection is not a valid PostgreSQL link ressource. Why there is a warning
who appears ?

Test script:
---------------
$state = pg_connection_status($conn);
if ($state === PGSQL_CONNECTION_OK) {
  return true;
}

Actual result:
--------------
pg_connection_status(): 103 is not a valid PostgreSQL link resource

-- 
Edit bug report at http://bugs.php.net/bug.php?id=54607&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=54607&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=54607&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=54607&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=54607&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54607&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=54607&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=54607&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=54607&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=54607&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=54607&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=54607&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=54607&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=54607&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=54607&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54607&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54607&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=54607&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=54607&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=54607&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=54607&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=54607&r=mysqlcfg



Thread (6 messages)

« previous php.bugs (#160380) next »