From fe68aac7d9882d3bb2f42489365484d15c0fa395 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Tue, 24 Apr 2012 16:10:46 +0200 Subject: [PATCH] MDL-32471 using === for string comparison Thanks to Petr Skoda for spotting this during the peer-review. --- lib/filestorage/file_storage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/filestorage/file_storage.php b/lib/filestorage/file_storage.php index bf059a82d27..05d3e28c14d 100644 --- a/lib/filestorage/file_storage.php +++ b/lib/filestorage/file_storage.php @@ -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 {