mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
commit
1f4aa0537b
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user