Merge pull request #421 from silverstripe-scienceninjas/bad-exception-throwing

BUGFIX Throwing an InvalidArgumentException without the new keyword results in a Fatal error
This commit is contained in:
Sean Harvey 2012-05-09 17:56:57 -07:00
commit 1f4aa0537b

View File

@ -26,7 +26,7 @@ class GenericTemplateGlobalProvider implements TemplateGlobalProvider {
if(isset(self::$modules[$name])) {
return self::$modules[$name];
} else {
throw InvalidArgumentException(sprintf('%s is not a supported argument. Possible values: %s', $name, implode(', ', self::$modules)));
throw new InvalidArgumentException(sprintf('%s is not a supported argument. Possible values: %s', $name, implode(', ', self::$modules)));
}
}