summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2021-12-20 15:21:22 +0100
committerAndrey Andreev <narf@devilix.net>2021-12-20 15:21:22 +0100
commit52e2fe01d2819110162b154b2785df88149f3a3b (patch)
treef6acd53221d5593b2fca0f93b971d7c946240d84 /system/libraries
parent74384ca7f88913b87e982696bb5cb3eb5593c451 (diff)
finfo_open() returns an finfo object instead of resource in PHP 8.1
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Upload.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index ae60f35af..e754205de 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1227,7 +1227,7 @@ class CI_Upload {
if (function_exists('finfo_file'))
{
$finfo = @finfo_open(FILEINFO_MIME);
- if (is_resource($finfo)) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system
+ if ($finfo !== FALSE) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system
{
$mime = @finfo_file($finfo, $file['tmp_name']);
finfo_close($finfo);