Skip to content

Commit

Permalink
[Filesystem] fix for PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Sep 27, 2020
1 parent 495646f commit 7cdf7d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,13 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
*/
public function isAbsolutePath($file)
{
return strspn($file, '/\\', 0, 1)
return '' !== (string) $file && (strspn($file, '/\\', 0, 1)
|| (\strlen($file) > 3 && ctype_alpha($file[0])
&& ':' === $file[1]
&& strspn($file, '/\\', 2, 1)
)
|| null !== parse_url($file, \PHP_URL_SCHEME)
;
);
}

/**
Expand Down

0 comments on commit 7cdf7d2

Please sign in to comment.