Skip to content

Commit

Permalink
BUGFIX: Ensure that extensio arugments are passed when temporarily in…
Browse files Browse the repository at this point in the history
…stantiating for setting up statics.
  • Loading branch information
Sam Minnee committed Jun 11, 2012
1 parent c41ff29 commit 1aefc0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/DataExtension.php
Expand Up @@ -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");
Expand Down

0 comments on commit 1aefc0a

Please sign in to comment.