Merge branch 'xorg/maint' into xorg/master
[platal.git] / modules / survey / question.inc.php
index bd206ad..f8cde84 100644 (file)
@@ -47,11 +47,7 @@ class SurveyQuestion extends PlDBTableEntry
 
     public static function instanceForType(Survey $survey, $type)
     {
-        $file = dirname(__FILE__) . '/' . $type . '.inc.php';
-        if (!file_exists($file)) {
-            throw new Exception("Unknown question type \"$type\"");
-        }
-        require_once $file;
+        require_once dirname(__FILE__) . '/' . $type . '.inc.php';
         $class = 'SurveyQuestion' . $type;
         return new $class($survey);
     }