Update Upload.php

This commit is contained in:
Roman Kelesidis 2025-03-01 21:10:06 +03:00
commit a6faf4191a

View file

@ -190,7 +190,7 @@ class Upload
} }
// Check extension // Check extension
if ($uploaded_only && (!isset($this->ext_ids[$this->file_ext]) || !\in_array($this->file_ext, $this->cfg['allowed_ext'], true))) { if ($uploaded_only && (!isset($this->ext_ids[$this->file_ext]) || !in_array($this->file_ext, $this->cfg['allowed_ext'], true))) {
$this->errors[] = sprintf($lang['UPLOAD_ERROR_NOT_ALLOWED'], htmlCHR($this->file_ext)); $this->errors[] = sprintf($lang['UPLOAD_ERROR_NOT_ALLOWED'], htmlCHR($this->file_ext));
return false; return false;
} }
@ -231,7 +231,7 @@ class Upload
*/ */
public function _move($file_path) public function _move($file_path)
{ {
$dir = \dirname($file_path); $dir = dirname($file_path);
if (!file_exists($dir)) { if (!file_exists($dir)) {
if (!bb_mkdir($dir)) { if (!bb_mkdir($dir)) {
$this->errors[] = "Cannot create dir: $dir"; $this->errors[] = "Cannot create dir: $dir";