mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 14:16:39 +02:00
drivers: getResource() and getResultResource() checks if resource is alive
This commit is contained in:
@@ -202,7 +202,7 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
*/
|
||||
public function getResource()
|
||||
{
|
||||
return $this->connection;
|
||||
return is_resource($this->connection) ? $this->connection : NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
*/
|
||||
public function getResultResource()
|
||||
{
|
||||
return $this->resultSet;
|
||||
return is_resource($this->resultSet) ? $this->resultSet : NULL;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user