Skip to content

"Expecting a sanitizing function" does not allow (int) #53

@Aaron3

Description

@Aaron3

The following snippet fails:

   public function custom_column_display( $column, $post_id )
    {
        global $post;
        switch ( $column ) {
            case 'some_number' : 
                echo (int) get_post_meta( $post_id, SOME_NUMBER, true );
            break;
        }
    }

This is allowed by http://codex.wordpress.org/Data_Validation

intval( $int ) or (int) $int
If it's supposed to be an integer, cast it as one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions