Skip to content

Commit 7cdf7d2

Browse files
[Filesystem] fix for PHP 8
1 parent 495646f commit 7cdf7d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Filesystem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,13 +599,13 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
599599
*/
600600
public function isAbsolutePath($file)
601601
{
602-
return strspn($file, '/\\', 0, 1)
602+
return '' !== (string) $file && (strspn($file, '/\\', 0, 1)
603603
|| (\strlen($file) > 3 && ctype_alpha($file[0])
604604
&& ':' === $file[1]
605605
&& strspn($file, '/\\', 2, 1)
606606
)
607607
|| null !== parse_url($file, \PHP_URL_SCHEME)
608-
;
608+
);
609609
}
610610

611611
/**

0 commit comments

Comments
 (0)