bug #39555 [FrameworkBundle] Fix NFS detection on macOs (jderusse)

This PR was merged into the 5.2 branch.

Discussion
----------

[FrameworkBundle] Fix NFS detection on macOs

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39552
| License       | MIT
| Doc PR        | -

Commits
-------

79718fb70f Fix NFS detection on macOs
This commit is contained in:
Alexander M. Turek 2020-12-18 13:02:15 +01:00
commit 7a7ded2a6b

View File

@ -207,8 +207,8 @@ EOF
if (null === $mounts) {
$mounts = [];
if ('/' === \DIRECTORY_SEPARATOR && $mounts = @file('/proc/mounts')) {
foreach ($mounts as $mount) {
if ('/' === \DIRECTORY_SEPARATOR && $files = @file('/proc/mounts')) {
foreach ($files as $mount) {
$mount = \array_slice(explode(' ', $mount), 1, -3);
if (!\in_array(array_pop($mount), ['vboxsf', 'nfs'])) {
continue;