Skip to content
This repository
Browse code

Merge pull request #1643 from mahagr/master

J3.0 installer: Catch thrown exception if alter table fails
  • Loading branch information...
commit 5729bda781a2b2c6493c898bd6c612c02f0a8494 2 parents 28f13e0 + 118d452
Matias Griese authored April 11, 2013
12  administrator/components/com_kunena/install/model.php
@@ -815,10 +815,16 @@ function processUpgradeXMLNode($action)
815 815
 			case 'query':
816 816
 				$query = (string)$action;
817 817
 				$this->db->setQuery($query);
818  
-				$this->db->query();
819  
-				if (!$this->db->getErrorNum()) {
820  
-					$success = true;
  818
+
  819
+				try {
  820
+					$this->db->query();
  821
+					if (!$this->db->getErrorNum()) {
  822
+						$success = true;
  823
+					}
  824
+				} catch (Exception $e) {
  825
+					$success = false;
821 826
 				}
  827
+
822 828
 				if ($action['mode'] == 'silenterror' || !$this->db->getAffectedRows() || $success)
823 829
 					$result = null;
824 830
 				else

0 notes on commit 5729bda

Please sign in to comment.
Something went wrong with that request. Please try again.