Merge branch 'MDL-60819-master' of https://github.com/snake/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 12 Jun 2018 00:58:49 +0000 (08:58 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 12 Jun 2018 00:58:49 +0000 (08:58 +0800)
lib/filestorage/stored_file.php

index 0f67664..f1c3f75 100644 (file)
@@ -1063,6 +1063,9 @@ class stored_file {
      * @return  string|bool false if a problem occurs, the thumbnail image data otherwise
      */
     public function generate_image_thumbnail($width, $height) {
+        global $CFG;
+        require_once($CFG->libdir . '/gdlib.php');
+
         if (empty($width) or empty($height)) {
             return false;
         }