Make WordPress Core


Ignore:
Timestamp:
05/06/2014 09:22:22 PM (10 years ago)
Author:
wonderboymusic
Message:

In wp-includes/functions.php, remove dead code:

  • In current_time(), break is unreachable after return.
  • In add_query_arg(), $ret is set twice before being used.
  • In wp_mkdir_p(), $dir_perms is set twice before being used.

See #27882.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r28259 r28325  
    6262        case 'mysql':
    6363            return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) );
    64             break;
    6564        case 'timestamp':
    6665            return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS );
    67             break;
    6866        default:
    6967            return ( $gmt ) ? date( $type ) : date( $type, time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) );
    70             break;
    7168    }
    7269}
     
    693690 */
    694691function add_query_arg() {
    695     $ret = '';
    696692    $args = func_get_args();
    697693    if ( is_array( $args[0] ) ) {
     
    14281424
    14291425    // Get the permission bits.
    1430     $dir_perms = false;
    14311426    if ( $stat = @stat( $target_parent ) ) {
    14321427        $dir_perms = $stat['mode'] & 0007777;
Note: See TracChangeset for help on using the changeset viewer.