[wp-trac] [WordPress Trac] #16942: Dead code in add_query_arg()
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 23 02:15:57 UTC 2011
#16942: Dead code in add_query_arg()
-----------------------+------------------------------
Reporter: hakre | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch |
-----------------------+------------------------------
As it just has been checked that $uri contains at least one ?, then
exploding $uri on ? with a limit of 2 must return two elements, right?
{{{
if ( strpos( $uri, '?' ) !== false ) {
$parts = explode( '?', $uri, 2 );
if ( 1 == count( $parts ) ) {
}}}
So the if clause can never be true, the code is dead.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16942>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list