21489 Posts in 5783 Topics by 2622 members
General Questions
SilverStripe Forums » General Questions » CustomSiteConfig should be compatible with DataExtension::extraStatics()
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 937 Views |
-
CustomSiteConfig should be compatible with DataExtension::extraStatics()

21 June 2012 at 8:29am
I'm getting this line in my php log on every page load
PHP Strict Standards: Declaration of CustomSiteConfig::extraStatics() should be compatible with that of DataExtension::extraStatics() in /ss3/mysite/code/CustomSiteConfig.php on line 17
CustomSiteConfig.php files content
<?php
class CustomSiteConfig extends DataExtension {
public function extraStatics(){
return array(
'db' => array(
'FacebookLink' => 'Varchar(255)'
)
);
}public function updateCMSFields(FieldList $fields) {
$fields->addFieldToTab('Root.Main', new TextField('FacebookLink', 'Facebook Link'));
$fields->removeByName('Theme');
}
}Using SS3 RC1 wiht MAMP and php version 5.3.6
Any ideas what could be wrong with my code?
-
Re: CustomSiteConfig should be compatible with DataExtension::extraStatics()

21 June 2012 at 10:31am Last edited: 21 June 2012 10:32am
The upgrading documentation explains that extraStatics() is deprecated and you should just use
public static $db = array(
'FacebookLink' => 'Varchar(255)',
);The error itself is because 3.0 now includes E_STRICT errors, so method declarations must match the declaration of the parent method it is overriding.
-
Re: CustomSiteConfig should be compatible with DataExtension::extraStatics()

21 June 2012 at 10:54am
Thank You for the help, don't know how I missed that.
| 937 Views | ||
|
Page:
1
|
Go to Top |

