Permalink
Browse files

Merge branch 'wip-mdl-28580' of git://github.com/rajeshtaneja/moodle

  • Loading branch information...
2 parents fe8682f + bb44ef9 commit c6f94ea2fa5c31dd2367880c6ad3f734d9147fcb @nebgor nebgor committed Aug 22, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/upgradelib.php
View
@@ -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 c6f94ea

Please sign in to comment.