Merge pull request #1127 from halkyon/sprintf_missing

BUG sprintf missing on exception in SilverStripeNavigator
This commit is contained in:
Sam Minnée 2014-11-03 14:40:12 +13:00
commit 93d09d4dbb

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;