Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

error after upgrading to 2.4.1


Go to End


2 Posts   1849 Views

Avatar
pjssms

Community Member, 49 Posts

17 September 2010 at 8:14pm

I am getting error

Notice: DataObjectDecorator::extraDBFields() is deprecated. Please use extraStatics() instead. in /home/vendeopr/public_html/sapphire/core/model/DataObjectDecorator.php on line 60
?
any suggestion ?

Avatar
Willr

Forum Moderator, 5523 Posts

19 September 2010 at 2:06pm

Its as the error says, don't use extraDBFields() use extraStatics(). This is probably coming from a module which will need to be upgraded to a newer version for 2.4.

Check all your installed modules and custom code for extraDBFields(). All modules which have that will need to be updated to the latest version and your custom code changed from..

function extraDBFields() {
return array(....);
}

Change that to...

function extraStatics() {
return array('db' => array(...);
}