Skip to content

Loading…

Fix fatal error in JInstallerFile::uninstall() #1533

Merged
merged 1 commit into from

2 participants

@mahagr

If there's error when parsing uninstall SQL from manifest, $db->stderr(true) gets run before $db is defined.

@pasamio pasamio merged commit 049b784 into joomla:staging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 15, 2012
  1. @mahagr
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1 libraries/joomla/installer/adapters/file.php
View
3 libraries/joomla/installer/adapters/file.php
@@ -512,6 +512,8 @@ public function uninstall($id)
$this->parent->set('extension_message', $msg);
}
+ $db = JFactory::getDbo();
+
// Let's run the uninstall queries for the extension
$result = $this->parent->parseSQLFiles($this->manifest->uninstall->sql);
@@ -523,7 +525,6 @@ public function uninstall($id)
}
// Remove the schema version
- $db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->delete()
->from('#__schemas')
Something went wrong with that request. Please try again.