mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR CSSContentParser::__construct() now gives a better error if the content could not be parsed. This will mostly happen if tidy isn't present.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@109274 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4311966880
commit
c86d297b0d
@ -46,7 +46,10 @@ class CSSContentParser extends Object {
|
||||
$tidy = $content;
|
||||
}
|
||||
|
||||
$this->simpleXML = simplexml_load_string($tidy, 'SimpleXMLElement', LIBXML_NOWARNING);
|
||||
$this->simpleXML = @simplexml_load_string($tidy, 'SimpleXMLElement', LIBXML_NOWARNING);
|
||||
if(!$this->simpleXML) {
|
||||
throw new Exception('CSSContentParser::__construct(): Could not parse content. Please check the PHP extension tidy is installed.');
|
||||
}
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user