From: skodak Date: Sun, 21 Jun 2009 18:22:16 +0000 (+0000) Subject: MDL-14589 fixed error message if url malformed X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=49375088781b517ec27a5460499a9283e140b23b;p=moodle.git MDL-14589 fixed error message if url malformed --- diff --git a/pluginfile.php b/pluginfile.php index 6bc351ec96..224f039c39 100644 --- a/pluginfile.php +++ b/pluginfile.php @@ -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();