Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

J3.0 installer: Catch thrown exception if alter table fails #1643

Merged
merged 1 commit into from

1 participant

@mahagr
Owner

No description provided.

@mahagr mahagr merged commit 5729bda into Kunena:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 3 deletions.
  1. +9 −3 administrator/components/com_kunena/install/model.php
View
12 administrator/components/com_kunena/install/model.php
@@ -815,10 +815,16 @@ function processUpgradeXMLNode($action)
case 'query':
$query = (string)$action;
$this->db->setQuery($query);
- $this->db->query();
- if (!$this->db->getErrorNum()) {
- $success = true;
+
+ try {
+ $this->db->query();
+ if (!$this->db->getErrorNum()) {
+ $success = true;
+ }
+ } catch (Exception $e) {
+ $success = false;
}
+
if ($action['mode'] == 'silenterror' || !$this->db->getAffectedRows() || $success)
$result = null;
else
Something went wrong with that request. Please try again.