Permalink
Browse files

Merge branch 'wip-mdl-28580-m20' of git://github.com/rajeshtaneja/moo…

…dle into MOODLE_20_STABLE
  • Loading branch information...
2 parents 84c656a + 12acab9 commit 5a80cab06dbc9dd4d4c4fa74685f9b26b34e9372 @nebgor nebgor committed Aug 22, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/upgradelib.php
View
6 lib/upgradelib.php
@@ -114,6 +114,12 @@ function __construct($plugin, $details) {
function upgrade_main_savepoint($result, $version, $allowabort=true) {
global $CFG;
+ //sanity check to avoid confusion with upgrade_mod_savepoint usage.
+ if (!is_bool($allowabort)) {
+ $errormessage = 'Parameter type mismatch. Are you mixing up upgrade_main_savepoint() and upgrade_mod_savepoint()?';
+ throw new coding_exception($errormessage);
+ }
+
if (!$result) {
throw new upgrade_exception(null, $version);
}

0 comments on commit 5a80cab

Please sign in to comment.