When I intentionally give pconnect() the wrong userid or password or dsn, PHP is generating a Warning in the log, and is NOT returning 0, as the docs say it's supposed to:
Here is a segment of my code:
$this->name = "dbname";
$this->user = "user12";
$this->pass = "1234";
function db2Connect() {
return ($this->conn = odbc_pconnect($this->name,$this->user,$this->pass));
} // db2Connect
// and when calling this function from another class:
$db2obj = new db2();
if (!$db2obj->db2Connect()) {
// handle error
}
Why can't I get the return value?????
:mad: