mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Fix type mismatch when filename argument is missing
This commit is contained in:
parent
df3e6b157a
commit
b9d79949b1
1 changed files with 4 additions and 4 deletions
|
|
@ -307,7 +307,7 @@ class FileController extends File
|
||||||
|
|
||||||
$file_srl = Context::get('file_srl');
|
$file_srl = Context::get('file_srl');
|
||||||
$sid = Context::get('sid');
|
$sid = Context::get('sid');
|
||||||
$filename_arg = htmlspecialchars_decode(Context::get('filename'));
|
$filename_arg = htmlspecialchars_decode(Context::get('filename') ?? '');
|
||||||
|
|
||||||
// Get file information from the DB
|
// Get file information from the DB
|
||||||
$file_obj = FileModel::getFile($file_srl);
|
$file_obj = FileModel::getFile($file_srl);
|
||||||
|
|
@ -318,7 +318,7 @@ class FileController extends File
|
||||||
{
|
{
|
||||||
throw new Rhymix\Framework\Exceptions\TargetNotFound('msg_file_not_found');
|
throw new Rhymix\Framework\Exceptions\TargetNotFound('msg_file_not_found');
|
||||||
}
|
}
|
||||||
if ($filename_arg !== null && $filename_arg !== $filename)
|
if ($filename_arg !== '' && $filename_arg !== $filename)
|
||||||
{
|
{
|
||||||
throw new Rhymix\Framework\Exceptions\TargetNotFound('msg_file_not_found');
|
throw new Rhymix\Framework\Exceptions\TargetNotFound('msg_file_not_found');
|
||||||
}
|
}
|
||||||
|
|
@ -434,7 +434,7 @@ class FileController extends File
|
||||||
// Get requsted file info
|
// Get requsted file info
|
||||||
$file_srl = Context::get('file_srl');
|
$file_srl = Context::get('file_srl');
|
||||||
$file_key = Context::get('file_key');
|
$file_key = Context::get('file_key');
|
||||||
$filename_arg = htmlspecialchars_decode(Context::get('filename'));
|
$filename_arg = htmlspecialchars_decode(Context::get('filename') ?? '');
|
||||||
|
|
||||||
$columnList = array('source_filename', 'uploaded_filename', 'file_size');
|
$columnList = array('source_filename', 'uploaded_filename', 'file_size');
|
||||||
$file_obj = FileModel::getFile($file_srl, $columnList);
|
$file_obj = FileModel::getFile($file_srl, $columnList);
|
||||||
|
|
@ -460,7 +460,7 @@ class FileController extends File
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check filename if given
|
// Check filename if given
|
||||||
if ($filename_arg !== null && $filename_arg !== $filename)
|
if ($filename_arg !== '' && $filename_arg !== $filename)
|
||||||
{
|
{
|
||||||
throw new Rhymix\Framework\Exceptions\TargetNotFound('msg_file_not_found');
|
throw new Rhymix\Framework\Exceptions\TargetNotFound('msg_file_not_found');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue