From a45ee54ee128d5cc31c75be39dec95c0bf8693f9 Mon Sep 17 00:00:00 2001
From: mjollnir_ <mjollnir_>
Date: Mon, 7 Feb 2005 21:10:25 +0000
Subject: [PATCH] Removing PHP notice in metacourse assign courses page (bug
 2479)

---
 course/importstudents.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/course/importstudents.php b/course/importstudents.php
index d3c4bc3f3a..433afebf1f 100644
--- a/course/importstudents.php
+++ b/course/importstudents.php
@@ -81,8 +81,9 @@
             $frm->previoussearch = 0;
         }
     }
+    
 
-    $previoussearch = (!empty($frm->search) or ($frm->previoussearch == 1)) ;
+    $previoussearch = (is_object($frm) && ((!empty($frm->search) or ($frm->previoussearch == 1)))) ;
 
     /// Get all existing students and teachers for this course.
     if(! $alreadycourses = get_courses_in_metacourse($course->id)) {
-- 
2.39.5