]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14589 fixed error message if url malformed
authorskodak <skodak>
Sun, 21 Jun 2009 18:22:16 +0000 (18:22 +0000)
committerskodak <skodak>
Sun, 21 Jun 2009 18:22:16 +0000 (18:22 +0000)
pluginfile.php

index 6bc351ec96eacdc8bea43516130c662649449452..224f039c398b09594588bc742bcbd3d82eea5fdd 100644 (file)
@@ -50,7 +50,9 @@ if (count($args) == 0) { // always at least user id
 $contextid = (int)array_shift($args);
 $filearea = array_shift($args);
 
-$context = get_context_instance_by_id($contextid);
+if (!$context = get_context_instance_by_id($contextid)) {
+    send_file_not_found();
+}
 $fs = get_file_storage();