mirror of
https://github.com/dg/dibi.git
synced 2025-08-29 16:59:49 +02:00
- removed DibiPostgreDriver workaround (there is no bug in pg_affected_rows)
- added IDibiConnection::isConnected()
This commit is contained in:
@@ -199,7 +199,7 @@ class dibi
|
||||
*/
|
||||
public static function isConnected()
|
||||
{
|
||||
return (bool) self::$connection;
|
||||
return (self::$connection !== NULL) && self::$connection->isConnected();
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ class dibi
|
||||
public static function getConnection($name = NULL)
|
||||
{
|
||||
if ($name === NULL) {
|
||||
if (!self::$connection) {
|
||||
if (self::$connection === NULL) {
|
||||
throw new DibiException('Dibi is not connected to database.');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user