summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2021-02-21 11:18:58 +0100
committerFlorian Pritz <bluewind@xinu.at>2021-02-21 11:18:58 +0100
commit08510ba2faa4785339ca7093ba0fa7052ff5d0c8 (patch)
tree108365fe3624295d70a677642b300fd458e7c569 /system/libraries/Upload.php
parent29e6c8ad462a426f4bc6d380646e434e3361a21d (diff)
parent0925b5099919300a239909588351a6482c5e792d (diff)
PHP8: Merge remote-tracking branch 'upstream/3.1-stable' into dev
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 29f9f5ff9..ae60f35af 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Uploads
* @author EllisLab Dev Team
- * @link https://codeigniter.com/user_guide/libraries/file_uploading.html
+ * @link https://codeigniter.com/userguide3/libraries/file_uploading.html
*/
class CI_Upload {
@@ -867,7 +867,7 @@ class CI_Upload {
$this->file_type = 'image/jpeg';
}
- $img_mimes = array('image/gif', 'image/jpeg', 'image/png');
+ $img_mimes = array('image/gif', 'image/jpeg', 'image/png', 'image/webp');
return in_array($this->file_type, $img_mimes, TRUE);
}
@@ -901,7 +901,7 @@ class CI_Upload {
}
// Images get some additional checks
- if (in_array($ext, array('gif', 'jpg', 'jpeg', 'jpe', 'png'), TRUE) && @getimagesize($this->file_temp) === FALSE)
+ if (in_array($ext, array('gif', 'jpg', 'jpeg', 'jpe', 'png', 'webp'), TRUE) && @getimagesize($this->file_temp) === FALSE)
{
return FALSE;
}