Permalink
Browse files

BUGFIX: Ensure that extensio arugments are passed when temporarily in…

…stantiating for setting up statics.
  • Loading branch information...
1 parent c41ff29 commit 1aefc0aa94ab36b023308846007d5f5178682565 @sminnee sminnee committed Jun 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 model/DataExtension.php
View
2 model/DataExtension.php
@@ -38,7 +38,7 @@ static function add_to_class($class, $extensionClass, $args = null) {
$extraStaticsMethod = 'extraStatics';
}
- $statics = singleton($extensionClass)->$extraStaticsMethod($class, $extensionClass);
+ $statics = Injector::inst()->get($extensionClass, true, $args)->$extraStaticsMethod($class, $extensionClass);
if ($statics) {
Deprecation::notice('3.1.0', "$extraStaticsMethod deprecated. Just define statics on your extension, or use add_to_class");

0 comments on commit 1aefc0a

Please sign in to comment.