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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

DataObjectDecorator extraStatics() error


Go to End


2 Posts   2085 Views

Avatar
BLU42 Media

Community Member, 71 Posts

27 January 2011 at 7:38am

I had a new error recently with SS 2.4.4... has anyone else seen this one?

Strict Standards: Non-static method MyModuleDecorator::extraStatics() cannot be called statically in /Applications/MAMP/htdocs/smartsuite/sapphire/core/model/DataObjectDecorator.php on line 69

<?php

class MyModuleDecorator extends DataObjectDecorator {

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

Avatar
Overt

Community Member, 5 Posts

28 October 2012 at 11:33pm

You need to upgrade SilverStripe or make changes by yourself: make this method static.