From 25544b1f42d12ee095ba8537c11ea4511cff20c2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 16 Jul 2009 23:46:24 +0000 Subject: [PATCH] BUGFIX Fail silently on shell_exec() in CSSContentParser to avoid unit test failures because of missing optional libraries like tidy (merged from branches/2.3-nzct) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@82056 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- dev/CSSContentParser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/CSSContentParser.php b/dev/CSSContentParser.php index 274dda197..ccb6e1575 100644 --- a/dev/CSSContentParser.php +++ b/dev/CSSContentParser.php @@ -34,7 +34,7 @@ class CSSContentParser extends Object { $tidy->cleanRepair(); $tidy = str_replace('xmlns="http://www.w3.org/1999/xhtml"','',$tidy); $tidy = str_replace(' ','',$tidy); - } elseif(`which tidy`) { + } elseif(@shell_exec('which tidy')) { // using tiny through cli $CLI_content = escapeshellarg($content); $tidy = `echo $CLI_content | tidy -n -q -utf8 -asxhtml 2> /dev/null`;