aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/upgrade.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/upgrade.php b/db/upgrade.php
index 0ce98b9..f4f9425 100644
--- a/db/upgrade.php
+++ b/db/upgrade.php
@@ -118,7 +118,8 @@ function save_records($records) {
$recordid = $DB->insert_record('local_webhooks_service', (object) $record, true, false);
if ($recordid && is_array($record['events'])) {
foreach ($record['events'] as $eventname) {
- $DB->insert_record('local_webhooks_events', (object) array('name' => $eventname, 'serviceid' => $recordid), true, false);
+ $event = array('name' => $eventname, 'serviceid' => $recordid);
+ $DB->insert_record('local_webhooks_events', (object) $event, true, false);
}
}
}