diff --git a/comment/lib.php b/comment/lib.php
index <HASH>..<HASH> 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 <HASH>..<HASH> 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;
MDL-<I> more E_STRCT fixes