From e510bf21d0989c5bdba0962136f801e94e1dcda3 Mon Sep 17 00:00:00 2001 From: Dac Chartrand Date: Fri, 22 Mar 2019 10:16:25 -0400 Subject: [PATCH] Fix: Warning: strpos(): Empty needle Kept getting this warning when doing `--include="*.blade.php"`, among other things Related to #125 and #129 --- src/IterableCodeExtractor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IterableCodeExtractor.php b/src/IterableCodeExtractor.php index c6cb1363..a3d44e3d 100644 --- a/src/IterableCodeExtractor.php +++ b/src/IterableCodeExtractor.php @@ -176,7 +176,7 @@ protected static function containsMatchingChildren( SplFileInfo $dir, array $mat // Or the start of the matcher until the first wildcard matches the start of the path. if ( ( '' !== $root_relative_path && 0 === strpos( $base, $root_relative_path ) ) || - 0 === strpos( $root_relative_path, $base ) + ( '' !== $base && 0 === strpos( $root_relative_path, $base ) ) ) { return true; }