Last modified: 2011-11-21 15:46:39 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 T34477, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32477 - MWHttpRequest may have to require_once() GlobalFunctions.php
MWHttpRequest may have to require_once() GlobalFunctions.php
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Unprioritized minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-18 15:05 UTC by drzraf
Modified: 2011-11-21 15:46 UTC (History)
2 users (show)

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


Attachments

Description drzraf 2011-11-18 15:05:48 UTC
If
* you attempt to MWHttpRequest::factory() (eg, during bootstrap, from an extension),
* and you don't have curl (should I ?)

=> then you're getting failures because wfIniGetBool() is not yet defined

There should be a way to require(GlobalFunctions.php) in such a case.

HTTP component set to "redirect", feel free to change this.
Comment 1 Liangent 2011-11-18 15:15:27 UTC
Are you using MWHttpRequest::factory() directly in the extension setup code? If so, suggest WONTFIX. It's expected that not everything are initialized at that time. There's also a [[mw:Manual:$wgExtensionFunctions]] for code which requires a fully initialized environment.
Comment 2 drzraf 2011-11-18 16:48:59 UTC
But shouldn't Auth-related extensions be used in LocalSettings in order to setup wgAuth instead of using wgExtensionFunctions ?
If so, then does it mean that such extension can't rely on MW HTTP facilities ?
Comment 3 Brion Vibber 2011-11-18 19:33:05 UTC
You'll want to create a $wgAuth instance I think (or should even that not run until wgExtensionFunctions time? quite possibly) but you definitely should NOT be actively attempting to use framework features as nothing may be set up yet.
Comment 4 drzraf 2011-11-18 22:52:52 UTC
I need MWHttpRequest during Auth::authenticate.
Just tested and it happens that wfIniGetBool *is* defined at this time.
(thus I'm fine with WONTFIX)

*but* if I wanted to use it during the *constructor* of my Auth plugin it would have failed.

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


Navigation
Links