From:             lbutler at intercall dot com
Operating system: Linux
PHP version:      Irrelevant
PHP Bug Type:     PostgreSQL related
Bug description:  Not able to 

Description:
------------
pg_close() and other pg_ functions unable to reference class variables as
link resource. (Works with mysql_connect()) 

Reproduce code:
---------------
<?php
   class databasehandler0 
   {
        var foo;

        function connect() 
        {
                $this->foo = pg_connect('host=hostname dbname=database1
user=username1 password=pword1') || die ('An aweful death');
        }

        function disconnect()
        {
                pg_close($this->foo);
        }

   }
     
   $dbconn0 = new databasehandler0;
   $dbconn0->connect();
   $dbconn0->disconnect();
   
?>

Expected result:
----------------
I expect to be able to reference the class var foo in pg_close() as a
resource connection.

Actual result:
--------------
Warning: pg_close(): supplied argument is not a valid PostgreSQL link
resource

-- 
Edit bug report at http://bugs.php.net/?id=28782&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28782&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28782&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28782&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28782&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28782&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28782&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28782&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28782&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28782&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28782&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28782&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28782&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28782&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28782&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28782&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28782&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28782&r=float

Reply via email to