From 788ccb8605bc33cfbf2db7d78881d48fa05876ac Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Tue, 11 Jul 2017 07:30:39 +0100 Subject: [PATCH] Trigger E_USER_NOTICE instead of throwing an exception if key cannot be chmod to 600 --- src/CryptKey.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CryptKey.php b/src/CryptKey.php index f3051d04..8b1ed110 100644 --- a/src/CryptKey.php +++ b/src/CryptKey.php @@ -50,12 +50,13 @@ class CryptKey // Attempt to correct the permissions if (chmod($keyPath, 0600) === false) { // @codeCoverageIgnoreStart - throw new \LogicException( + trigger_error( sprintf( 'Key file "%s" permissions are not correct, should be 600 instead of %s, unable to automatically resolve the issue', $keyPath, $keyPathPerms - ) + ), + E_USER_NOTICE ); // @codeCoverageIgnoreEnd }