]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixing usage of EncryptionException
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 17 Oct 2014 09:46:22 +0000 (11:46 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 17 Oct 2014 12:18:46 +0000 (14:18 +0200)
apps/files_encryption/lib/crypt.php

index f0905a89203df6cbbf45e3251924d70013ae66e1..bd86b2b69b548b0abd6f3dcb7ad2301d9c69adca 100755 (executable)
@@ -24,6 +24,7 @@
  */\r
 \r
 namespace OCA\Encryption;\r
+use OCA\Encryption\Exceptions\EncryptionException;\r
 \r
 require_once __DIR__ . '/../3rdparty/Crypt_Blowfish/Blowfish.php';\r
 \r
@@ -321,9 +322,9 @@ class Crypt {
                        $padded = self::addPadding($catfile);\r
 \r
                        return $padded;\r
-               } catch (OCA\Encryption\Exceptions\EncryptionException $e) {\r
-                       $message = 'Could not encrypt file content (code: ' . $e->getCode . '): ';\r
-                       \OCP\Util::writeLog('files_encryption', $message . $e->getMessage, \OCP\Util::ERROR);\r
+               } catch (EncryptionException $e) {\r
+                       $message = 'Could not encrypt file content (code: ' . $e->getCode() . '): ';\r
+                       \OCP\Util::writeLog('files_encryption', $message . $e->getMessage(), \OCP\Util::ERROR);\r
                        return false;\r
                }\r
 \r