From 57c8294ed37d4a055b77057827c67f9558c95c54 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 22 Oct 2024 12:26:52 +0200 Subject: [PATCH] Minor fixes around parse_url() checks --- Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Filesystem.php b/Filesystem.php index 1dcb36e3f..358a74b37 100644 --- a/Filesystem.php +++ b/Filesystem.php @@ -44,7 +44,7 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe $this->mkdir(\dirname($targetFile)); $doCopy = true; - if (!$overwriteNewerFiles && null === parse_url($originFile, \PHP_URL_HOST) && is_file($targetFile)) { + if (!$overwriteNewerFiles && !parse_url($originFile, \PHP_URL_HOST) && is_file($targetFile)) { $doCopy = filemtime($originFile) > filemtime($targetFile); }