Skip to content

Commit

Permalink
fix: issue with too many DB connections
Browse files Browse the repository at this point in the history
  • Loading branch information
daylightstudio committed Oct 19, 2023
1 parent 15611cc commit 6454106
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fuel/modules/fuel/core/MY_Model.php
Expand Up @@ -155,11 +155,12 @@ public function initialize($table = NULL, $params = array())
else
{
// else we use the database set on the CI object
if (empty($this->db))
$CI =& get_instance();
if (empty($CI->db))
{
$this->load->database($this->dsn);
}
$CI =& get_instance();

if (isset($CI->db))
{
// create a copy of the DB object to prevent cross model interference
Expand Down

0 comments on commit 6454106

Please sign in to comment.