fix warning

This commit is contained in:
xiaomlove
2020-12-30 02:37:43 +08:00
parent 398cf8607a
commit b92f152b67
9 changed files with 57 additions and 52 deletions

View File

@@ -23,6 +23,7 @@ $altsize = $_POST['altsize'] ?? '';
<body class="inframe">
<table width="100%">
<?php
$warning = "";
if ($Attach->enable_attachment())
{
if ($_SERVER["REQUEST_METHOD"] == "POST")
@@ -35,7 +36,7 @@ if ($Attach->enable_attachment())
$ext = strtolower(substr($origfilename, $ext_l+1, strlen($origfilename)-($ext_l+1)));
$banned_ext = array('exe', 'com', 'bat', 'msi');
$img_ext = array('jpeg', 'jpg', 'png', 'gif');
$warning = "";
if (!$file || $filesize == 0 || $file["name"] == "") // nothing received
{
$warning = $lang_attachment['text_nothing_received'];