From 49375088781b517ec27a5460499a9283e140b23b Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 21 Jun 2009 18:22:16 +0000 Subject: [PATCH] MDL-14589 fixed error message if url malformed --- pluginfile.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- 2.39.5