From 74642d9eec5db068421f79b06c23922019a1f387 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 22 Jun 2016 12:12:44 -0500 Subject: [PATCH] Minor - Avoid notice if certificate_data is not defined. In this case, the gradebook considers that there is no sub-gradebook and apparently everything works fine --- main/inc/lib/certificate.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/inc/lib/certificate.lib.php b/main/inc/lib/certificate.lib.php index a225a48a1c..3d2a06d53d 100755 --- a/main/inc/lib/certificate.lib.php +++ b/main/inc/lib/certificate.lib.php @@ -160,7 +160,9 @@ class Certificate extends Model $params['hide_print_button'] = isset($params['hide_print_button']) ? true : false; - $my_category = Category :: load($this->certificate_data['cat_id']); + if (isset($this->certificate_data)) { + $my_category = Category :: load($this->certificate_data['cat_id']); + } if (isset($my_category[0]) && $my_category[0]->is_certificate_available($this->user_id)