diff --git a/installation/CHANGELOG b/installation/CHANGELOG index 284b07c8161d1..63012c4afd8f0 100644 --- a/installation/CHANGELOG +++ b/installation/CHANGELOG @@ -26,6 +26,9 @@ $ -> Language fix or change - -> Removed ! -> Note +28-Jan-2013 Mark Dexter + # [#29999] Fix fatal error in JInstallerFile::uninstall(). Thanks Matias Griese. + 26-Jan-2013 Jean-Marie Simonet # [#30031] *Notice: Undefined index: title in /plugins/content/pagebreak/pagebreak.php on line 197. Thanks Bernard diff --git a/libraries/joomla/installer/adapters/file.php b/libraries/joomla/installer/adapters/file.php index cb22c04346842..00f0eba745d45 100644 --- a/libraries/joomla/installer/adapters/file.php +++ b/libraries/joomla/installer/adapters/file.php @@ -481,6 +481,7 @@ public function uninstall($id) // Second argument is the utf compatible version attribute $utfresult = $this->parent->parseSQLFiles($this->manifest->uninstall->sql); + $db = JFactory::getDbo(); if ($utfresult === false) { // Install failed, rollback changes @@ -488,8 +489,7 @@ public function uninstall($id) $retval = false; } - // Remove the schema version - $db = JFactory::getDbo(); + // Remove the schema version $query = $db->getQuery(true); $query->delete() ->from('#__schemas')