diff --git a/comment/lib.php b/comment/lib.php index d770e16643c..81c8d202392 100644 --- a/comment/lib.php +++ b/comment/lib.php @@ -636,7 +636,7 @@ class comment { * } * @return boolean */ - public function delete_comments($param) { + public static function delete_comments($param) { global $DB; $param = (array)$param; if (empty($param['contextid'])) { diff --git a/question/category_class.php b/question/category_class.php index 96b5efa32ab..fd65dbac81f 100644 --- a/question/category_class.php +++ b/question/category_class.php @@ -428,7 +428,7 @@ class question_category_object { } // Update the category record. - $cat = null; + $cat = new stdClass(); $cat->id = $updateid; $cat->name = $newname; $cat->info = $newinfo;