MDL-32471 using === for string comparison

Thanks to Petr Skoda for spotting this during the peer-review.
This commit is contained in:
David Mudrak 2012-04-24 16:10:46 +02:00
parent 9120a46257
commit fe68aac7d9

View File

@ -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 {