Adding unset($Ossn->dbLINK); in OssnDatabase.php because on error with PostgreSQL support

Ondrej Janicko Posted in General Discussion 8 years ago

I am upgrading PostgreSQL support from Ossn 4.3.1 to OSSN 4.4 and found that it gives me an error because new added avoiding multiple connection section in OssnDatabse.php in execute() function.

When I added unset($Ossn->dbLINK); after unset($this->query); in this execute() function, evrything works fine.

Did you forgot writte this unset($Ossn->dbLINK); for correct formal programming style or are you rely on automatic closing execution with MySQL?

Because with MySQL it seems it works fine as you have now, without unset($Ossn->dbLINK);

Thanks.

Replies
Indonesian Arsalan Shah Replied 8 years ago

From the documentation:

Note: The link to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling mysqli_close().

Slovak Ondrej Janicko Replied 8 years ago

An error what gives me was withouth any details. Just writen ossn:exception:title. No more.