diff --git a/wp-admin/includes/class-wp-filesystem-base.php b/wp-admin/includes/class-wp-filesystem-base.php index 10af816dbe..f8aeb86f88 100644 --- a/wp-admin/includes/class-wp-filesystem-base.php +++ b/wp-admin/includes/class-wp-filesystem-base.php @@ -371,9 +371,11 @@ class WP_Filesystem_Base { $legal = array('', 'w', 'r', 'x', '-'); $attarray = preg_split('//', $mode); - for ($i=0; $i < count($attarray); $i++) - if ($key = array_search($attarray[$i], $legal)) + for ( $i = 0, $c = count( $attarray ); $i < $c; $i++ ) { + if ($key = array_search($attarray[$i], $legal)) { $realmode .= $legal[$key]; + } + } $mode = str_pad($realmode, 10, '-', STR_PAD_LEFT); $trans = array('-'=>'0', 'r'=>'4', 'w'=>'2', 'x'=>'1'); diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php index 4602e7fba1..390465752f 100644 --- a/wp-admin/includes/image-edit.php +++ b/wp-admin/includes/image-edit.php @@ -461,7 +461,7 @@ function image_edit_apply_changes( $image, $changes ) { // Combine operations. if ( count($changes) > 1 ) { $filtered = array($changes[0]); - for ( $i = 0, $j = 1; $j < count($changes); $j++ ) { + for ( $i = 0, $j = 1, $c = count( $changes ); $j < $c; $j++ ) { $combined = false; if ( $filtered[$i]->type == $changes[$j]->type ) { switch ( $filtered[$i]->type ) { diff --git a/wp-includes/deprecated.php b/wp-includes/deprecated.php index b44f6d596f..6d71f646b2 100644 --- a/wp-includes/deprecated.php +++ b/wp-includes/deprecated.php @@ -1756,7 +1756,7 @@ function make_url_footnote( $content ) { _deprecated_function( __FUNCTION__, '2.9', '' ); preg_match_all( '/(.+?)<\/a>/', $content, $matches ); $links_summary = "\n"; - for ( $i=0; $i