mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-60819 core_files: fix exception thrown from generate_image_thumbnail
This function now requires gdlib.php.
This commit is contained in:
parent
50e48a8f2d
commit
28c3f6e4d8
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user