dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge "User: Clean up coding style and documentation"
[lhc/web/wiklou.git]
/
includes
/
ScopedCallback.php
diff --git
a/includes/ScopedCallback.php
b/includes/ScopedCallback.php
index
fa88c0e
..
ef22e0a
100644
(file)
--- a/
includes/ScopedCallback.php
+++ b/
includes/ScopedCallback.php
@@
-31,8
+31,12
@@
class ScopedCallback {
/**
* @param callable $callback
+ * @throws MWException
*/
public function __construct( $callback ) {
+ if ( !is_callable( $callback ) ) {
+ throw new MWException( "Provided callback is not valid." );
+ }
$this->callback = $callback;
}