From 703ffaea05dd73cff661cbad8d58e6286fc6b20a Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 20 Jun 2012 15:17:12 +0700 Subject: [PATCH] MDL-27156 repositories: altered a check as the !empty() test on $PAGE->course was always failing for some reason --- lib/form/filepicker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/form/filepicker.php b/lib/form/filepicker.php index a27f0151bb2..58253bbe6c9 100644 --- a/lib/form/filepicker.php +++ b/lib/form/filepicker.php @@ -76,7 +76,7 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input { $fpmaxbytes = $options['maxbytes']; } $coursemaxbytes = 0; - if (!empty($PAGE->course)) { + if (!empty($PAGE->course->maxbytes)) { $coursemaxbytes = $PAGE->course->maxbytes; } $this->_options['maxbytes'] = get_user_max_upload_file_size($PAGE->context, $CFG->maxbytes, $coursemaxbytes, $fpmaxbytes); -- 2.43.0