aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2023-12-26 10:21:17 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2023-12-26 10:21:17 +0000
commit8e6dc479c143a363f510c1cd03c4ad6bb336042f (patch)
treefe021c752f43b0d503db3971f333c21384769a33
parent775f58fd90852b1d85d1684c0e4757d21f46bc3e (diff)
downloadpmwiki.svn-8e6dc479c143a363f510c1cd03c4ad6bb336042f.tar.bz2
upload.php fix warning for PHP 8.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4571 524c5546-5005-0410-9a3e-e25e191bd360
-rw-r--r--scripts/upload.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/upload.php b/scripts/upload.php
index f7b9411b..7bf21abb 100644
--- a/scripts/upload.php
+++ b/scripts/upload.php
@@ -390,6 +390,8 @@ function UploadVerifyBasic($pagename,$uploadfile,&$filepath,&$upname=null) {
if (!$EnableUploadOverwrite && file_exists($filepath))
return 'upresult=exists';
preg_match('/\\.([^.\\/]+)$/',$filepath,$match); $ext=@$match[1];
+ if(!isset($UploadExtSize[$ext]))
+ return "upresult=badtype&upext=$ext";
$maxsize = $UploadExtSize[$ext];
if ($maxsize<=0) return "upresult=badtype&upext=$ext";
if (intval(@$uploadfile['size'])>$maxsize)