From 208fc3a5f0de86cd2784e3de6c0ef432aedddcab Mon Sep 17 00:00:00 2001 From: defacer Date: Tue, 26 Apr 2005 02:06:38 +0000 Subject: [PATCH] Initialize object with new stdClass. --- course/category.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/course/category.php b/course/category.php index cc19219fb70..1ce016f8b26 100644 --- a/course/category.php +++ b/course/category.php @@ -140,7 +140,7 @@ $sortorder = get_field_sql('SELECT MIN(sortorder)-1 AS min FROM ' . $CFG->prefix . 'course WHERE category=' . $destcategory->id) || 1000; - $newcourse = NULL; + $newcourse = new stdClass; $newcourse->id = $courseid; $newcourse->category = $destcategory->id; $newcourse->sortorder = $sortorder; @@ -155,7 +155,6 @@ } } - /// Hide or show a course if ((isset($hide) or isset($show)) and confirm_sesskey()) {