Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options
Why validation of tinyint be boolean?
nukboon
New
Annouce Field type in GDN_Discussion Table is tinyint data-type and can be insert 0,1,2 value into
but now tinyint validation be boolean cause i can't insert '2' (int) value (by my plugin)
my code (plugin)
function DiscussionModel_BeforeSaveDiscussion_Handler ..... .... $Args['FormPostValues']['Announce'] = 2;
in library/core/class.validation.php
// Force other constraints based on field type. switch($Properties->Type) { case 'tinyint': case 'bit': case 'bool': case 'boolean': $RuleNames[] = 'Boolean'; break;
0
Comments
that is a misunderstanding of the size parameter
http://alexander.kirk.at/2007/08/24/what-does-size-in-intsize-of-mysql-mean/
use
int(4)
for consistency.grep is your friend.
Default of Announce is tinyint(4) by Core.
i want to set $Args['FormPostValues']['Announce'] = 2;
how i can do in this case?
thank for reply