Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / filesystem / LockHandler.php
index a2e7ad5c336a5f22113cb513b73496f1e377ada9..8e0eb741213b2e1c03bd62fbf86ea1450e0ad692 100644 (file)
@@ -81,12 +81,12 @@ class LockHandler
             $error = $msg;
         });
 
-        if (!$this->handle = fopen($this->file, 'r')) {
+        if (!$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r')) {
             if ($this->handle = fopen($this->file, 'x')) {
-                chmod($this->file, 0444);
-            } elseif (!$this->handle = fopen($this->file, 'r')) {
+                chmod($this->file, 0666);
+            } elseif (!$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r')) {
                 usleep(100); // Give some time for chmod() to complete
-                $this->handle = fopen($this->file, 'r');
+                $this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r');
             }
         }
         restore_error_handler();