MOZ
Well-known member
I have been working on an addon and keep getting this error:
The field 'post_sticky' was not recognised.
Now I do have the below code in my DataWriter extender:
When I try to do this in my controller, I get an error:
So what is wrong?
The field 'post_sticky' was not recognised.
Now I do have the below code in my DataWriter extender:
Code:
class StickyFirstPost_DataWriter_Discussion_Thread extends XFCP_StickyFirstPost_DataWriter_Discussion_Thread
{
/**
* Gets the fields that are defined for the table. See parent for explanation.
*
* @return array
*/
protected function _getFields()
{
$fields = parent::_getFields();
$fields['xf_thread']['post_sticky'] = array('type' => self::TYPE_UINT, 'default' => '0');
return $fields;
}
}
When I try to do this in my controller, I get an error:
Code:
$dw->set('post_sticky',$dwInput['post_sticky'],'xf_thread');
So what is wrong?