Last modified: 2012-08-08 17:05:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39597, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37597 - Assignments in loop conditionals
Assignments in loop conditionals
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
EducationProgram (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-14 16:22 UTC by Sam Reed (reedy)
Modified: 2012-08-08 17:05 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2012-06-14 16:22:18 UTC
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Assignment_expressions

You really don't need to do:
while( $user = $result->fetchObject() ) {
Comment 1 Jeroen De Dauw 2012-08-08 17:01:00 UTC
Heh - odd - I know this, so what was I thinking while writing those :)
Comment 2 Chad H. 2012-08-08 17:03:06 UTC
(In reply to comment #0)
> You really don't need to do:
> while( $user = $result->fetchObject() ) {

You know, there's nothing *harmful* about doing it though ;-)
Comment 3 Jeroen De Dauw 2012-08-08 17:05:51 UTC
Gerrit change #18111

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links