8000 Fix Symfony not working on SMB share #45990 · symfony/symfony@1ff7ebc · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ff7ebc

Browse files
committed
Fix Symfony not working on SMB share #45990
1 parent 6d0d2f5 commit 1ff7ebc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,7 @@ protected function initializeContainer()
528528
is_dir($cacheDir) ?: mkdir($cacheDir, 0777, true);
529529

530530
if ($lock = fopen($cachePath.'.lock', 'w')) {
531-
flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock);
532-
533-
if (!flock($lock, $wouldBlock ? \LOCK_SH : \LOCK_EX)) {
531+
if (!flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock) && !flock($lock, $wouldBlock ? \LOCK_SH : \LOCK_EX)) {
534532
fclose($lock);
535533
$lock = null;
536534
} elseif (!is_file($cachePath) || !\is_object($this->container = include $cachePath)) {

0 commit comments

Comments
 (0)
0