ID: 28782
User updated by: lbutler at intercall dot com
-Summary: Not able to
Reported By: lbutler at intercall dot com
Status: Open
Bug Type: PostgreSQL related
Operating System: Linux
PHP Version: Irrelevant
New Comment:
Changed summary discription.
Previous Comments:
------------------------------------------------------------------------
[2004-06-14 21:34:42] lbutler at intercall dot com
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 this bug report at http://bugs.php.net/?id=28782&edit=1