MDL-34234 course: Fixed notice causing issues in JS when upgrade settings for 2.3...
authorSam Hemelryk <sam@moodle.com>
Sun, 5 Aug 2012 21:29:41 +0000 (09:29 +1200)
committerSam Hemelryk <sam@moodle.com>
Sun, 30 Sep 2012 20:58:09 +0000 (09:58 +1300)
mod/resource/lib.php

index d2cf5e1..0a330fe 100644 (file)
@@ -512,8 +512,8 @@ function resource_dndupload_handle($uploadinfo) {
     $data->popupwidth = $config->popupwidth;
     $data->printheading = $config->printheading;
     $data->printintro = $config->printintro;
-    $data->showsize = $config->showsize;
-    $data->showtype = $config->showtype;
+    $data->showsize = (isset($config->showsize)) ? $config->showsize : 0;
+    $data->showtype = (isset($config->showtype)) ? $config->showtype : 0;
     $data->filterfiles = $config->filterfiles;
 
     return resource_add_instance($data, null);