Skip to content

Commit

Permalink
Don't have a metadataManager class property to avoid circular depende…
Browse files Browse the repository at this point in the history
…ncy problem when instantiating multiple applications
  • Loading branch information
Michael Babker committed Mar 14, 2018
1 parent 23d2b43 commit eb53304
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions libraries/src/Application/CMSApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ class CMSApplication extends WebApplication
*/
protected $_messageQueue = array();

/**
* The session metadata manager
*
* @var MetadataManager
* @since 3.8.6
*/
protected $metadataManager = null;

/**
* The name of the application.
*
Expand Down Expand Up @@ -115,8 +107,6 @@ public function __construct(Input $input = null, Registry $config = null, \JAppl
{
parent::__construct($input, $config, $client);

$this->metadataManager = new MetadataManager($this, \JFactory::getDbo());

// Load and set the dispatcher
$this->loadDispatcher();

Expand Down Expand Up @@ -158,7 +148,8 @@ public function __construct(Input $input = null, Registry $config = null, \JAppl
*/
public function checkSession()
{
$this->metadataManager->createRecordIfNonExisting(\JFactory::getSession(), \JFactory::getUser());
$metadataManager = new MetadataManager($this, \JFactory::getDbo());
$metadataManager->createRecordIfNonExisting(\JFactory::getSession(), \JFactory::getUser());
}

/**
Expand Down

0 comments on commit eb53304

Please sign in to comment.