From 48429e57e6cc86e317d7b30c869651be687eb5e7 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 8 Aug 2004 18:31:09 +0000 Subject: [PATCH] Avoid one notice when creating a new glossary. --- mod/glossary/mod.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/glossary/mod.html b/mod/glossary/mod.html index feb8614d81..49f2a4099d 100644 --- a/mod/glossary/mod.html +++ b/mod/glossary/mod.html @@ -241,8 +241,10 @@ if (!$mainglossary or $mainglossary->id == $form->instance ) { //get and update available formats $recformats = glossary_get_available_formats(); //reload current format, because of it has changed (deleted format) - if ($currentglossary = get_record("glossary",'id',$form->id)) { - $form->displayformat = $currentglossary->displayformat; + if (isset($form->id)) { + if ($currentglossary = get_record("glossary",'id',$form->id)) { + $form->displayformat = $currentglossary->displayformat; + } } $formats = array(); -- 2.39.5