User "Platonides" changed the status of MediaWiki.r89707. Old Status: fixme New Status: ok
User "Platonides" also posted a comment on MediaWiki.r89707. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89707#c17812 Commit summary: quick fix for bug28983 . Do not use $path in the loop. Even the remaining $e is dangerous subject to change from the require-once-loaded extensions. This is NOT A FINAL fix, just a small improvement Comment: This is prefectly sane. On the next iteration foreach() sets $e again, so the changed $e would not corrupt it. A change to $ext looks more suspicious, but it is locked by the foreach, so no problem there, either. <source lang="php"> <?php $a = array( 1, 2, 3 ); foreach( $a as $b ) { echo "$b\n"; $a = array( 'foo', 'bar', 'baz' ); $b = 'Hello World!'; } </source> outputs 1 2 3 (and leaves $a set to 'foo', 'bar', 'baz') _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
