1
0
Fork 0

Merge pull request #1615 from shanethehat/loop-optimization

Optimizing loops
pull/1618/head
Jordi Boggiano 2013-02-25 02:28:54 -08:00
commit 35e0054e8a
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ class VersionParser
$pairs = array_values($pairs); $pairs = array_values($pairs);
$result = array(); $result = array();
for ($i = 0; $i < count($pairs); $i++) { for ($i = 0, $count = count($pairs); $i < $count; $i++) {
$pair = preg_replace('{^([^=: ]+)[=: ](.*)$}', '$1 $2', trim($pairs[$i])); $pair = preg_replace('{^([^=: ]+)[=: ](.*)$}', '$1 $2', trim($pairs[$i]));
if (false === strpos($pair, ' ') && isset($pairs[$i+1]) && false === strpos($pairs[$i+1], '/')) { if (false === strpos($pair, ' ') && isset($pairs[$i+1]) && false === strpos($pairs[$i+1], '/')) {
$pair .= ' '.$pairs[$i+1]; $pair .= ' '.$pairs[$i+1];