mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-32471 using === for string comparison
Thanks to Petr Skoda for spotting this during the peer-review.
This commit is contained in:
parent
9120a46257
commit
fe68aac7d9
@ -190,7 +190,7 @@ class file_storage {
|
||||
|
||||
$mimetype = $file->get_mimetype();
|
||||
|
||||
if ($mimetype == 'image/gif' or $mimetype == 'image/jpeg' or $mimetype == 'image/png') {
|
||||
if ($mimetype === 'image/gif' or $mimetype === 'image/jpeg' or $mimetype === 'image/png') {
|
||||
// make a preview of the image
|
||||
$data = $this->create_imagefile_preview($file, $mode);
|
||||
|
||||
@ -244,10 +244,10 @@ class file_storage {
|
||||
$tmpfilepath = $tmproot.'/'.$file->get_contenthash();
|
||||
$file->copy_content_to($tmpfilepath);
|
||||
|
||||
if ($mode == 'tinyicon') {
|
||||
if ($mode === 'tinyicon') {
|
||||
$data = generate_image_thumbnail($tmpfilepath, 16, 16);
|
||||
|
||||
} else if ($mode == 'thumb') {
|
||||
} else if ($mode === 'thumb') {
|
||||
$data = generate_image_thumbnail($tmpfilepath, 90, 90);
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user