From b8ef96e9ba4e627040af3c844c59a6f385c89bea Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 25 Jan 2013 08:14:09 +0100 Subject: [PATCH] [Finder] fixed regression in the Finder component (it was possible to use it without using exec before, closes #6357) --- src/Symfony/Component/Finder/Shell/Shell.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Finder/Shell/Shell.php b/src/Symfony/Component/Finder/Shell/Shell.php index a03e64366db66..0b01636c38c13 100644 --- a/src/Symfony/Component/Finder/Shell/Shell.php +++ b/src/Symfony/Component/Finder/Shell/Shell.php @@ -52,7 +52,11 @@ public function testCommand($command) { if (self::TYPE_WINDOWS === $this->type) { // todo: find a way to test if windows command exists - return true; + return false; + } + + if (!function_exists('exec')) { + return false; } // todo: find a better way (command could not be available)