Last active
March 9, 2018 18:15
-
-
Save nathandentzau/355f3476b13cab38294ebc0207cedac0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Drupal/Component/PhpStorage/FileStorage.php b/lib/Drupal/Component/PhpStorage/FileStorage.php | |
index 63b3cbe..c1d8170 100644 | |
--- a/lib/Drupal/Component/PhpStorage/FileStorage.php | |
+++ b/lib/Drupal/Component/PhpStorage/FileStorage.php | |
@@ -164,7 +164,7 @@ EOF; | |
if (is_dir($directory)) { | |
// Avoid writing permissions if possible. | |
if (fileperms($directory) !== $mode) { | |
- return chmod($directory, $mode); | |
+ return @chmod($directory, $mode); | |
} | |
return TRUE; | |
} | |
diff --git a/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php b/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php | |
index c7e6feb..a49cd19 100644 | |
--- a/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php | |
+++ b/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php | |
@@ -73,7 +73,7 @@ class MTimeProtectedFastFileStorage extends FileStorage { | |
} | |
// The file will not be chmod() in the future so this is the final | |
// permission. | |
- chmod($temporary_path, 0444); | |
+ @chmod($temporary_path, 0444); | |
// Determine the exact modification time of the file. | |
$mtime = $this->getUncachedMTime($temporary_path); | |
@@ -97,7 +97,7 @@ class MTimeProtectedFastFileStorage extends FileStorage { | |
// Hence updating the mtime here is comparable to pointing a symbolic link | |
// at a new target, i.e., the newly created file. | |
if ($result) { | |
- $result &= touch($directory . '/', $mtime); | |
+ $result &= @touch($directory . '/', $mtime); | |
} | |
return (bool) $result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using DrupalVM with BindFS enabled, Drupal will produce dozens of warnings in
drupal_set_message()
.