Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33f070f
)
MDL-64314 messaging: Quick fix for empty insights configuration.
author
Adrian Greeve
<abgreeve@gmail.com>
Mon, 18 Feb 2019 15:30:19 +0000
(16:30 +0100)
committer
Adrian Greeve
<abgreeve@gmail.com>
Mon, 18 Feb 2019 15:30:19 +0000
(16:30 +0100)
lib/db/upgrade.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/db/upgrade.php
b/lib/db/upgrade.php
index
d3a2ff8
..
e9bbae5
100644
(file)
--- a/
lib/db/upgrade.php
+++ b/
lib/db/upgrade.php
@@
-2721,8
+2721,10
@@
function xmldb_main_upgrade($oldversion) {
if ($oldversion < 2019021500.01) {
$insights = $DB->get_record('message_providers', ['component' => 'moodle', 'name' => 'insights']);
- $insights->capability = null;
- $DB->update_record('message_providers', $insights);
+ if (!empty($insights)) {
+ $insights->capability = null;
+ $DB->update_record('message_providers', $insights);
+ }
upgrade_main_savepoint(true, 2019021500.01);
}