Skip to content

Instantly share code, notes, and snippets.

@junaidpv
Created August 2, 2024 19:01
Show Gist options
  • Save junaidpv/3272e73422c82ebe187fb7a174f8aa70 to your computer and use it in GitHub Desktop.
Save junaidpv/3272e73422c82ebe187fb7a174f8aa70 to your computer and use it in GitHub Desktop.
A custom patch to specifcally fix the error reported at https://www.drupal.org/project/file_encrypt/issues/3259893 for WWM sites
diff --git a/src/EncryptStreamWrapper.php b/src/EncryptStreamWrapper.php
index 68b0357..e3e31af 100644
--- a/src/EncryptStreamWrapper.php
+++ b/src/EncryptStreamWrapper.php
@@ -96,7 +96,7 @@ class EncryptStreamWrapper extends LocalStream {
* The base path for encrypt://.
*/
public static function basePath() {
- return Settings::get('encrypted_file_path', '');
+ return Settings::get('encrypted_file_path', \Drupal::getContainer()->getParameter('site.path') . '/private/files-encrypted');
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment