Trigger E_USER_NOTICE instead of throwing an exception if key cannot be chmod to 600

This commit is contained in:
Alex Bilbie 2017-07-11 07:30:39 +01:00
parent 26889abdd3
commit 788ccb8605

View File

@ -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
}