Skip to content

Commit

Permalink
SqLite: Fix fatal error when resource closed prior to result destructing
Browse files Browse the repository at this point in the history
  • Loading branch information
dakujem authored and dg committed Aug 5, 2023
1 parent 2a11971 commit ab6e222
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dibi/Drivers/SqliteResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(\SQLite3Result $resultSet)
*/
public function __destruct()
{
if ($this->autoFree && $this->getResultResource()) {
if ($this->autoFree && is_resource($this->getResultResource())) {
@$this->free();
}
}
Expand Down

0 comments on commit ab6e222

Please sign in to comment.