Skip to content

Commit

Permalink
Merge branch 'wip-mdl-28580-m21' of git://github.com/rajeshtaneja/moo…
Browse files Browse the repository at this point in the history
…dle into MOODLE_21_STABLE
  • Loading branch information
Aparup Banerjee committed Aug 22, 2011
2 parents 812e329 + 01f9bc7 commit 8db14e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/upgradelib.php
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8db14e3

Please sign in to comment.