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.

Why validation of tinyint be boolean?

nukboonnukboon New
edited September 2012 in Vanilla 2.0 - 2.8

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';


Sign In or Register to comment.