Last modified: 2014-02-12 23:35:44 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 T42342, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40342 - User::newFromId should not assume ID exists
User::newFromId should not assume ID exists
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low major (vote)
: Future release
Assigned To: Krinkle
:
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2012-09-18 23:38 UTC by Krinkle
Modified: 2014-02-12 23:35 UTC (History)
3 users (show)

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


Attachments

Description Krinkle 2012-09-18 23:38:30 UTC
In other words:

"User:newFromId should not set ItemLoaded['id'] = true"

$ php maintenance/eval.php:
> < $u = User:newFromId( 1000000000000000000 ); // Exa-, 10^18
> < $u->getId();
> 1000000000000000000;
> > var_dump( $u->isLoggedIn() );
> > true
> > $u->isItemLoaded( 'id' );
> > true

Bumped into this while fixing bug 40340.
Comment 1 Mark A. Hershberger 2012-09-30 16:22:38 UTC
If you're going to set a milestone, it would be reasonable to set a priority.
Comment 2 Aravind K N 2014-02-03 14:28:19 UTC
User.php, Line 278.

$this->mLoadedItems = true;
// Set it now to avoid infinite recursion in accessors

Isn't this the thing that was asked to be changed? But would infinite recursion occur as specified?

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


Navigation
Links