Last modified: 2010-05-15 15:41:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6688 - WebRequest Object Breaks
WebRequest Object Breaks
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.7.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-15 09:20 UTC by Martin Dale Lyness
Modified: 2010-05-15 15:41 UTC (History)
0 users

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


Attachments

Description Martin Dale Lyness 2006-07-15 09:20:49 UTC
The WebRequest object breaks when it is called. I am using it to get two items
from a form, but i get an error like this:

Fatal error: Call to a member function on a non-object in
../includes/WebRequest.php on line 137

I looked at the source code of the WebRequest and I thought I would try making
an object so i wasn't calling it statically like the tutorial on the wiki says.
There was no change

Here is a snippit of my calling code:

$webreq = new WebRequest();
	/**
	 * I'll be a good boy and get the post vars using the wikimedia objects :).
	 * Nevermind, it keeps giving me problems i just get it the normal way :(.
	 */
	if(isset($_POST['emailArray']) && isset($_POST['emailMsg']) &&
isset($_POST['emailSbj']) && $webreq->wasPosted()) {
		$emailArray = $webreq->getArray('emailArray');
		$message = $webreq->getVal('emailMsg');
		$subject = $webreq->getVal('emailSbj');
		/* $emailArray = $_POST['emailArray'];
		$message = $_POST['emailMsg'];
		$subject = $_POST['emailSbj']; */
	} else {
		return "Could not find Post variables!".var_dump($_POST);
	}


Regardless if my code is failing or not, the WebRequest object should not be
producing errors, it should return a failure message or something.

Martin
Comment 1 Brion Vibber 2006-07-16 21:56:51 UTC
Use $wgRequest only.

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


Navigation
Links