dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8527153
)
HTMLForm: Throw exceptions in some circumstances
author
Andrew Garrett
<werdna@users.mediawiki.org>
Mon, 3 May 2010 09:10:50 +0000
(09:10 +0000)
committer
Andrew Garrett
<werdna@users.mediawiki.org>
Mon, 3 May 2010 09:10:50 +0000
(09:10 +0000)
includes/HTMLForm.php
patch
|
blob
|
history
diff --git
a/includes/HTMLForm.php
b/includes/HTMLForm.php
index
ba4720e
..
636e0d0
100644
(file)
--- a/
includes/HTMLForm.php
+++ b/
includes/HTMLForm.php
@@
-191,6
+191,14
@@
class HTMLForm {
* @return Bool whether submission was successful.
*/
function show() {
+ // Check if we have the info we need
+ if ( ! $this->mTitle ) {
+ throw new MWException( "You must call setTitle() on an HTMLForm" );
+ }
+ if ( ! $this->mSubmitCallback ) {
+ throw new MWException( "You must set a submission callback" );
+ }
+
$html = '';
self::addJS();