mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Don't call the size function count() as part of a test condition in loops. Compute the size beforehand, and not on each iteration.
Scrutinizer added a Performance label: these are the only violations. See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@31554 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1756,7 +1756,7 @@ function make_url_footnote( $content ) {
|
||||
_deprecated_function( __FUNCTION__, '2.9', '' );
|
||||
preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
|
||||
$links_summary = "\n";
|
||||
for ( $i=0; $i<count($matches[0]); $i++ ) {
|
||||
for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) {
|
||||
$link_match = $matches[0][$i];
|
||||
$link_number = '['.($i+1).']';
|
||||
$link_url = $matches[2][$i];
|
||||
|
||||
Reference in New Issue
Block a user