From 6bcf267b21b6021e5bd3bd88e89fbfab80676757 Mon Sep 17 00:00:00 2001 From: sgiehl Date: Wed, 31 Jul 2013 23:20:47 +0200 Subject: fixing more namespaces --- core/Updater.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'core/Updater.php') diff --git a/core/Updater.php b/core/Updater.php index 1da4f30a44..740bb2e031 100644 --- a/core/Updater.php +++ b/core/Updater.php @@ -56,7 +56,7 @@ class Updater { try { Piwik_SetOption($this->getNameInOptionTable($name), $version, $autoLoad = 1); - } catch (Exception $e) { + } catch (\Exception $e) { // case when the option table is not yet created (before 0.2.10) } } @@ -149,7 +149,7 @@ class Updater * Update the named component * * @param string $componentName 'core', or plugin name - * @throws Exception|Updater_UpdateErrorException + * @throws \Exception|Updater_UpdateErrorException * @return array of warning strings if applicable */ public function update($componentName) @@ -167,7 +167,7 @@ class Updater $this->recordComponentSuccessfullyUpdated($componentName, $fileVersion); } catch (Updater_UpdateErrorException $e) { throw $e; - } catch (Exception $e) { + } catch (\Exception $e) { $warningMessages[] = $e->getMessage(); } } @@ -225,7 +225,7 @@ class Updater /** * Construct list of outdated components * - * @throws Exception + * @throws \Exception * @return array array( componentName => array( oldVersion, newVersion), [...]) */ public function getComponentsWithNewVersion() @@ -242,9 +242,9 @@ class Updater foreach ($this->componentsToCheck as $name => $version) { try { $currentVersion = Piwik_GetOption('version_' . $name); - } catch (Exception $e) { + } catch (\Exception $e) { // mysql error 1146: table doesn't exist - if (Zend_Registry::get('db')->isErrNo($e, '1146')) { + if (\Zend_Registry::get('db')->isErrNo($e, '1146')) { // case when the option table is not yet created (before 0.2.10) $currentVersion = false; } else { @@ -287,9 +287,9 @@ class Updater foreach ($sqlarray as $update => $ignoreError) { try { Db::exec($update); - } catch (Exception $e) { + } catch (\Exception $e) { if (($ignoreError === false) - || !Zend_Registry::get('db')->isErrNo($e, $ignoreError) + || !\Zend_Registry::get('db')->isErrNo($e, $ignoreError) ) { $message = $file . ":\nError trying to execute the query '" . $update . "'.\nThe error was: " . $e->getMessage(); throw new Updater_UpdateErrorException($message); -- cgit v1.2.3