Skip to content

Commit ebc5149

Browse files
Merge branch '3.4' into 4.4
* 3.4: [Filesystem] fix for PHP 8
2 parents 0d38697 + 7cdf7d2 commit ebc5149

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Filesystem.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -597,13 +597,13 @@ public function isAbsolutePath($file)
597597
@trigger_error(sprintf('Calling "%s()" with a null in the $file argument is deprecated since Symfony 4.4.', __METHOD__), \E_USER_DEPRECATED);
598598
}
599599

600-
return strspn($file, '/\\', 0, 1)
600+
return '' !== (string) $file && (strspn($file, '/\\', 0, 1)
601601
|| (\strlen($file) > 3 && ctype_alpha($file[0])
602602
&& ':' === $file[1]
603603
&& strspn($file, '/\\', 2, 1)
604604
)
605605
|| null !== parse_url($file, \PHP_URL_SCHEME)
606-
;
606+
);
607607
}
608608

609609
/**

0 commit comments

Comments
 (0)