r114270 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114269‎ | r114270 | r114271 >
Date:14:16, 20 March 2012
Author:reedy
Status:reverted
Tags:
Comment:
Followup r114233, define the method static variables to be used
Modified paths:
  • /trunk/phase3/includes/CryptRand.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CryptRand.php
@@ -187,6 +187,7 @@
188188 * @return String A hash algorithm
189189 */
190190 protected function hashAlgo() {
 191+ static $algo;
191192 if ( !is_null( $algo ) ) {
192193 return $algo;
193194 }
@@ -217,6 +218,7 @@
218219 * @return int Number of bytes the hash outputs
219220 */
220221 protected function hashLength() {
 222+ static $hashLength;
221223 if ( is_null( $hashLength ) ) {
222224 $hashLength = strlen( $this->hash( '' ) );
223225 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r114272Followup r114270 (essentially reverts it), and r114233, use class member vari...reedy14:21, 20 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114233Commit the cryptrand project worked on in git:...dantman05:17, 20 March 2012

Status & tagging log