Opened 15 years ago
Closed 12 years ago
#16942 closed defect (bug) (fixed)
Dead code in add_query_arg()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.7 | Priority: | normal |
| Severity: | trivial | Version: | 3.1 |
| Component: | General | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
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.
Attachments (2)
Change History (10)
Note: See
TracTickets for help on using
tickets.
Stripping the dead.