From: umherirrender Date: Thu, 24 Jul 2014 15:33:27 +0000 (+0200) Subject: Avoid function calls in the loop condition of a for statement X-Git-Tag: 1.31.0-rc.0~14762^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=2c6bba5e9b7ffa2adfe8f33c36b4becdc48b28b2;p=lhc%2Fweb%2Fwiklou.git Avoid function calls in the loop condition of a for statement Change-Id: I64d9ba96797085b6f54658218404a02d4087ceaf --- diff --git a/thumb.php b/thumb.php index 9a4b332124..2d7cca77c8 100644 --- a/thumb.php +++ b/thumb.php @@ -520,7 +520,8 @@ function wfExtractThumbRequestInfo( $thumbRel ) { $repo = RepoGroup::singleton()->getLocalRepo(); $hashDirReg = $subdirReg = ''; - for ( $i = 0; $i < $repo->getHashLevels(); $i++ ) { + $hashLevels = $repo->getHashLevels(); + for ( $i = 0; $i < $hashLevels; $i++ ) { $subdirReg .= '[0-9a-f]'; $hashDirReg .= "$subdirReg/"; }