From ef5998eabb5bd67ad385ae0663cf9308383d4838 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 21:22:22 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@28325 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index f800b10ce2..dd7df98472 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -61,13 +61,10 @@ function current_time( $type, $gmt = 0 ) { switch ( $type ) { case 'mysql': return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ) ); - break; case 'timestamp': return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ); - break; default: return ( $gmt ) ? date( $type ) : date( $type, time() + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ); - break; } } @@ -692,7 +689,6 @@ function _http_build_query($data, $prefix=null, $sep=null, $key='', $urlencode=t * @return string New URL query string. */ function add_query_arg() { - $ret = ''; $args = func_get_args(); if ( is_array( $args[0] ) ) { if ( count( $args ) < 2 || false === $args[1] ) @@ -1427,7 +1423,6 @@ function wp_mkdir_p( $target ) { } // Get the permission bits. - $dir_perms = false; if ( $stat = @stat( $target_parent ) ) { $dir_perms = $stat['mode'] & 0007777; } else {