[wp-trac] [WordPress Trac] #14061: Bugs in edit-tags and edit columns regarding post_type vars
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 24 05:23:34 UTC 2010
#14061: Bugs in edit-tags and edit columns regarding post_type vars
--------------------------+-------------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0.1
Component: Taxonomy | Version:
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
Changes (by shidouhikari):
* cc: shidouhikari (added)
Comment:
Instead of
{{{
$post_type = !empty($_POST['post_type']) ? $_POST['post_type'] : 'post';
}}}
I'd use
{{{
$post_type = empty($_POST['post_type']) ? 'post' : $_POST['post_type'];
}}}
There's no need for the NOT, and ternary operator doesn't necessarily
means
{{{
if(<sucessiful>) <success> else <default>
}}}
:P
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14061#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list