r114675 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114674‎ | r114675 | r114676 >
Date:23:50, 2 April 2012
Author:tstarling
Status:deferred
Tags:live 
Comment:
Fix infinite loop, apparently readdir(false) === null
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/ConfirmEdit/FancyCaptcha.class.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/ConfirmEdit/FancyCaptcha.class.php
@@ -97,6 +97,9 @@
9898
9999 // Check which subdirs are actually present...
100100 $dir = opendir( $directory );
 101+ if ( !$dir ) {
 102+ return false;
 103+ }
101104 while ( false !== ( $entry = readdir( $dir ) ) ) {
102105 if ( ctype_xdigit( $entry ) && strlen( $entry ) == 1 ) {
103106 $dirs[] = $entry;

Status & tagging log