From 7f936d7dbc0d70028ede17dc15ff36f842f75c85 Mon Sep 17 00:00:00 2001 From: Marco Sirabella Date: Fri, 30 Oct 2020 08:52:43 -0700 Subject: [PATCH] Ignore failures on preg_match for user supplied regex Fixes #7440 See: https://stackoverflow.com/a/12941133/6381767 --- src/Composer/Package/Archiver/BaseExcludeFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Package/Archiver/BaseExcludeFilter.php b/src/Composer/Package/Archiver/BaseExcludeFilter.php index 18fa05404..8e69ed069 100644 --- a/src/Composer/Package/Archiver/BaseExcludeFilter.php +++ b/src/Composer/Package/Archiver/BaseExcludeFilter.php @@ -59,7 +59,7 @@ abstract class BaseExcludeFilter $path = $relativePath; } - if (preg_match($pattern, $path)) { + if (@preg_match($pattern, $path)) { $exclude = !$negate; } }