diff --git a/installation/controller/install/languages.php b/installation/controller/install/languages.php index 2e0ed67221577..9b3aa132752c1 100644 --- a/installation/controller/install/languages.php +++ b/installation/controller/install/languages.php @@ -28,7 +28,6 @@ public function __construct() // Overrides application config and set the configuration.php file so tokens and database works JFactory::$config = null; JFactory::getConfig(JPATH_SITE . '/configuration.php'); - JFactory::$session = null; } /** diff --git a/installation/controller/setdefaultlanguage.php b/installation/controller/setdefaultlanguage.php index ec0a57622e826..4de1631f051ca 100644 --- a/installation/controller/setdefaultlanguage.php +++ b/installation/controller/setdefaultlanguage.php @@ -28,7 +28,6 @@ public function __construct() // Overrides application config and set the configuration.php file so tokens and database works JFactory::$config = null; JFactory::getConfig(JPATH_SITE . '/configuration.php'); - JFactory::$session = null; } /** diff --git a/installation/model/languages.php b/installation/model/languages.php index d74967fb14a81..d0ffae445994d 100644 --- a/installation/model/languages.php +++ b/installation/model/languages.php @@ -58,7 +58,13 @@ public function __construct() // Overrides application config and set the configuration.php file so tokens and database works. JFactory::$config = null; JFactory::getConfig(JPATH_SITE . '/configuration.php'); - JFactory::$session = null; + + /* + * JFactory::getDbo() gets called during app bootup, and because of the "uniqueness" of the install app, the config doesn't get read + * correctly at that point. So, we have to reset the factory database object here so that we can get a valid database configuration. + * The day we have proper dependency injection will be a glorious one. + */ + JFactory::$database = null; parent::__construct(); }