mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-16 14:53:54 +00:00
Fixing missing extension index in js_upload
This commit is contained in:
parent
e8633a6c3d
commit
47b2326dff
1 changed files with 5 additions and 1 deletions
|
@ -14,6 +14,7 @@
|
||||||
* Module Author: Chris Case
|
* Module Author: Chris Case
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
@ -333,7 +334,10 @@ class qqFileUploader {
|
||||||
$pathinfo = pathinfo($this->file->getName());
|
$pathinfo = pathinfo($this->file->getName());
|
||||||
$filename = $pathinfo['filename'];
|
$filename = $pathinfo['filename'];
|
||||||
|
|
||||||
$ext = $pathinfo['extension'];
|
if (!isset($pathinfo['extension'])) {
|
||||||
|
Logger::warning('extension isn\'t set.', ['filename' => $filename]);
|
||||||
|
}
|
||||||
|
$ext = defaults($pathinfo, 'extension', '');
|
||||||
|
|
||||||
if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){
|
if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){
|
||||||
$these = implode(', ', $this->allowedExtensions);
|
$these = implode(', ', $this->allowedExtensions);
|
||||||
|
|
Loading…
Reference in a new issue