Page MenuHomePhabricator

Assignments in loop conditionals
Closed, ResolvedPublic

Description

https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Assignment_expressions

You really don't need to do:
while( $user = $result->fetchObject() ) {


Version: unspecified
Severity: normal

Details

Reference
bz37597

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:23 AM
bzimport set Reference to bz37597.

Heh - odd - I know this, so what was I thinking while writing those :)

(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 ;-)