1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-12 01:50:48 +01:00
This commit is contained in:
czaks 2015-03-10 14:22:29 +01:00
parent eb245c2970
commit 6c4d3941fa

View File

@ -109,7 +109,7 @@ class Api {
if (isset($post->files) && $post->files && !$threadsPage) {
$file = $post->files[0];
$this->translateFields($this->fileFields, $file, $apiPost);
$apiPost['filename'] = substr($file->name, 0, strrpos($file->name, '.'));
$apiPost['filename'] = isset($file->name) ? substr($file->name, 0, strrpos($file->name, '.')) : "";
$dotPos = strrpos($file->file, '.');
$apiPost['ext'] = substr($file->file, $dotPos);
$apiPost['tim'] = substr($file->file, 0, $dotPos);