dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
9ca36c1
)
Merge "HTMLForm: throw a warning when no callback is set"
author
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 24 May 2012 23:31:30 +0000
(23:31 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Thu, 24 May 2012 23:31:30 +0000
(23:31 +0000)
includes/HTMLForm.php
patch
|
blob
|
history
diff --git
a/includes/HTMLForm.php
b/includes/HTMLForm.php
index
e56ca2e
..
c149965
100644
(file)
--- a/
includes/HTMLForm.php
+++ b/
includes/HTMLForm.php
@@
-333,6
+333,9
@@
class HTMLForm extends ContextSource {
}
$callback = $this->mSubmitCallback;
+ if ( !is_callable( $callback ) ) {
+ throw new MWException( 'HTMLForm: no submit callback provided. Use setSubmitCallback() to set one.' );
+ }
$data = $this->filterDataForSubmit( $this->mFieldData );