BUG sprintf missing on exception in SilverStripeNavigator

This commit is contained in:
Sean Harvey 2014-11-03 14:09:27 +13:00
parent 7fc5a29f35
commit 56142b8bba
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,10 @@ class SilverStripeNavigator extends ViewableData {
*/
public function __construct($record) {
if(!in_array('CMSPreviewable', class_implements($record))) {
throw new InvalidArgumentException('SilverStripeNavigator: Record of type %s doesn\'t implement CMSPreviewable', get_class($record));
throw new InvalidArgumentException(sprintf(
'SilverStripeNavigator: Record of type %s doesn\'t implement CMSPreviewable',
get_class($record)
));
}
$this->record = $record;