BUGFIX SSViewer::getTemplateContent() now gracefully continues to operate if the file name can't be found to get unparsed content from.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74294 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-04-08 23:36:05 +00:00
parent 0881728d79
commit 2199a581e1

View File

@ -275,6 +275,10 @@ class SSViewer extends Object {
* @return string content of template
*/
public static function getTemplateContent($identifier) {
if(!SSViewer::getTemplateFile($identifier)) {
return null;
}
return file_get_contents(SSViewer::getTemplateFile($identifier));
}