ERROR [User Notice]: Upload::setAllowedExtensions() is deprecated. Please use Upload_Validator::setAllowedExtensions() instead
Getting same sort of error while using the following code from ssbits.com on the following URL:
http://www.ssbits.com/tutorials/2009/embed-flash-content-using-swfobject/
<?php
class FlashPage extends Page
{
public static $db = array(
'AlternateContent' => 'HTMLText'
);
public static $has_one = array(
'FlashFile' => 'File'
);
public function getCMSFields(){
$fields = parent::getCMSFields();
// create a file upload field that only allows swf to be uploaded
$fileUpload = new FileIFrameField('FlashFile', 'Flash file (swf)');
$fileUpload->setAllowedExtensions(array('swf'));
$fields->addFieldsToTab('Root.Content.Flash', array(
$fileUpload,
new HtmlEditorField('AlternateContent', 'Flash replacement text', 20)
));
return $fields;
}
}
class FlashPage_Controller extends Page_Controller
{
}